Skip to main content
Glama

Change what to find or bring back

edit_spec
Read-only

Changes a condition or a fact to bring back without rewording the request. It takes the revised reading as ast, with the edit operations. Returns a checked reading with a new ast_hash for the next quote. Results that already ran stay as they were.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "ast": "<ast>",
      "operations": "<operations>"
    },
    "name": "edit_spec"
  }
}

Input Schema

NameRequiredDescriptionDefault
astYes
operationsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $defs / WordedCondition / description
      Previous value: -"A requirement no catalog field expresses, kept in the person's own words.\n\nSchema is acceleration, never permission: each result's own pages are read\nfor this statement (yes / no / unsure). A yes needs a quote the code finds in\nthe result's own source; a quoted no removes the result; an unconfirmed line\nis delivered marked."New value: +"A requirement no catalog field expresses, kept in the person's own words.\n\nSchema is acceleration, never permission: each result's own pages are read\nfor this statement (yes / no / unsure). A yes needs a quote the code finds in\nthe result's own source; a quoted no removes the result; a line no page\nstates is delivered and marked as not stated on a page."
  2. First observed

TDQS

C2.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds genuine context beyond that: the edit is non-destructive to prior finds ("Results that already ran stay as they were"), it does not reword the request, and it returns a checked reading plus a new ast_hash for a subsequent quote. It stops short of saying what happens when an operation is invalid or how the checked reading reports problems.

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

Conciseness3/5

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

Four short sentences, each carrying information, and the edit-then-return flow is reasonably front-loaded. The phrasing is compressed to the point of ambiguity ("a condition or a fact to bring back", "checked reading"), which costs clarity without saving much space.

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

Completeness1/5

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

For a tool whose input is a large nested QueryAst plus an array of chip operations and which has no output schema, the description covers almost none of the essential structure. It never explains the chip operation contract, the set/remove semantics, validation behavior, or what the returned checked reading contains, leaving the agent to reverse-engineer all of it from the schema.

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

Parameters2/5

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

Schema description coverage is 0%, so the description carries the burden, and it only names the two parameters in passing ("the revised reading as ast, with the edit operations"). The nested ChipOperation structure — set vs remove, what a chip_id refers to, whether operations target where clauses or output fields — is left entirely unexplained. An agent must infer the operation contract from the deeply nested schema alone.

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

Purpose3/5

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

The description identifies an edit operation on a query spec ("Changes a condition or a fact ... takes the revised reading as ast, with the edit operations") and states it returns a checked reading with a new ast_hash. However, it uses invented vocabulary ("condition", "fact", "reading") that does not map cleanly to the schema's terms (where, output_fields, predicates), so an agent must guess which parts of the AST are editable. It never distinguishes itself from close siblings such as revise_spec, create_spec, or archive_spec.

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

Usage Guidelines2/5

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

There is no statement of when to use edit_spec rather than revise_spec, create_spec, or get_spec_revision, and no prerequisites such as needing an existing spec or a fresh ast_hash. The only usage-adjacent line, "Results that already ran stay as they were", hints at scope but does not tell the agent when this tool is the right choice.

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.