Skip to main content
Glama

Manage Gnosari Instructions

gnosari_manage_instructions

Update an agent's system instructions.

Prefer action="edit" with anchored edits for any change to existing text: only the changed span is sent, everything else stays byte-identical, and the response's applied[].excerpt shows what landed so no second read is needed. Use replace only to write a whole new instruction set, append/prepend to add at either end.

The usual flow is gnosari_create → gnosari_get (read instructions_version) → this tool with expected_version set; every response returns the new instructions_version for the next call. The agent's behavior is defined entirely by its instructions, so craft them carefully.

Raises: ValueError: VALIDATION_ERROR for a malformed call, ANCHOR_NOT_FOUND or ANCHOR_AMBIGUOUS for an unusable anchor, CONFLICT for a stale expected_version, or a wizard-guardrail rejection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
editsNoAnchored partial edits for action 'edit' — prefer this over 'content' for any change to existing text. Each edit is {op, old, new}, where op is replace/insert_before/insert_after/delete/append/prepend. 'old' is matched exactly, whitespace-significant, and must occur exactly once unless replace_all=True — if it is ambiguous, widen it with surrounding lines. Edits apply in order, all-or-nothing: any failing edit writes nothing and names its index. Never re-send the whole text to change part of it. Maximum 20 per call
actionYesHow to apply the change: 'edit' applies anchored partial edits (prefer it for any change to existing text), 'replace' overwrites everything, 'append' adds to the end, 'prepend' adds to the beginning
contentNoWhole-text payload for action 'replace', 'append' or 'prepend'. Never combine with 'edits'. To CLEAR instructions call gnosari_update(clear_fields=["instructions"]) — an empty string is refused
gnosari_idYesID of the agent to update
confirm_replaceNoDeliberate-overwrite flag. Required when action='replace' would discard more than 2000 stored characters; ignored otherwise
expected_versionNoThe instructions_version from your last gnosari_get (or from the previous write's response). Strongly recommended with 'edits': if the stored text changed underneath you the call is refused with CONFLICT and nothing is written

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
appliedNoOne entry per anchored edit, in submitted order, each with an excerpt of the change — verify the write from these instead of re-reading. Empty for action='replace', which is not anchored
previewYesFirst 200 characters of the instructions
readinessYesConfiguration completeness with machine-readable missing keys and prioritized next steps
gnosari_idYesAgent ID
action_performedYesWhat was done: 'replace', 'append', 'prepend', or 'edit'
instructions_lengthYesCharacter count of the instructions after the operation
instructions_versionYesContent hash of the stored instructions AFTER this write. Pass it as the next call's expected_version to guarantee nobody changed the text underneath you

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare the safety flags (non-readonly, non-destructive, non-idempotent). The description adds real behavior beyond them: edits are all-or-nothing with failing-edit index reporting, anchors are byte-exact and must be unique, a confirm_replace guard fires past 2000 stored characters, and stale expected_version yields CONFLICT with nothing written. This is exactly the extra context annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The critical guidance (prefer edit, anchored spans) is front-loaded before the workflow and error notes. The Raises block earns its place by naming the failure codes an agent must handle, though the prose is dense enough that a tighter edit would help.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With six params, a nested edit object, a rich output schema, and a stateful version contract, this is a complex tool — and the description covers the workflow, mutation semantics, conflict behavior, and error surface. Return values are left to the output schema, as appropriate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3 and the schema does most of the work. The description still adds value over it: the preference for edits over content, the prohibition on combining them, the 20-edit cap, and the version-threading contract. It stops short of explaining every field, hence not a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource upfront ("Update an agent's system instructions") and immediately distinguishes its modes (edit/replace/append/prepend) from the sibling gnosari_update used for clearing. An agent can tell exactly what this tool does and which sibling handles the adjacent case.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use routing: prefer 'edit' for changes to existing text, 'replace' only for a whole new instruction set, append/prepend for additive changes, and gnosari_update(clear_fields) for clearing. It also spells out the create → get → manage flow with expected_version, leaving nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources