session-attribute

Session settings for choosing input and output formats, ID encoding, and the maximum number of results returned by a query.

In plain words
What is it for?
Use it to list current session settings or change values such as JSON versus BSON, the result limit, and object ID format.
Why use it?
It lets each database session use the formats and result limits that fit the client, without changing the underlying data.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/kronotop/kronotop/session-attribute
Clone the repo
git clone --depth 1 https://github.com/kronotop/kronotop
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 609 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00008 $0.00609
Opus 5 $0.00004 $0.00304
Sonnet 5 $0.00002 $0.00122
Haiku 4.5 $0.00001 $0.00061

Measured 3d ago against content hash 5f0c3309c760, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

session-attribute scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/sessions/commands/session-attribute.md · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Views and modifies session-specific configuration attributes.

Syntax

SESSION.ATTRIBUTE LIST
SESSION.ATTRIBUTE SET <attribute> <value>

Subcommands

LIST

Returns all session attributes with their current values.

In RESP3 the response is a map; in RESP2 it is a flat array of alternating key-value pairs.

SET

Sets a single session attribute to the given value. Returns OK on success.

Attributes

Attribute Type Default Valid Values Description
reply_type enum bson bson, json Data interchange format for responses
input_type enum bson bson, json Data interchange format for inputs
limit integer 100 > 0 Maximum entries returned per query response
object_id_format enum bytes bytes, hex Encoding format for object ID values in responses

All attribute names and enum values are case-insensitive.

Errors

Error Cause
ERR Invalid subcommand status: <value> The subcommand is neither LIST nor SET
ERR Invalid reply type: <value> Invalid value for reply_type
ERR Invalid input type: <value> Invalid value for input_type
ERR 'limit' must be greater than 0 limit was set to 0 or a negative number
ERR Invalid versionstamp format: <value> Invalid value for object_id_format
ERR invalid number of parameters SET called without both attribute and value
ERR Invalid session attribute: '<name>' The attribute name does not exist

Read the full file on GitHub · 89 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 89 lines · 8 tokens per session scan A 5f0c3309c760

Subscribe to this mod's changes

session-attribute is a command published in the GitHub repository kronotop/kronotop (307 stars, last pushed 3d ago), licensed Apache-2.0. It adds 8 tokens to every session and 609 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.