Skip to main content
Glama

Add, reword, remove or restore a criterion

edit_criterion

Before the run: action=add (a new requirement in words; an AI call adds it), edit (new wording and/or role / standard of criterion_id), remove («Неверно»: drop it; confirm true when the answer warned that it is the only job-title criterion), restore («Вернуть»: undo the last change of it). The estimate is counted again. [REST: POST /api/tasks/{id}/criteria, POST /api/tasks/{id}/criteria/{cid}/edit|remove|restore]

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": {
      "task_id": "<task_id>",
      "action": "<action>"
    },
    "name": "edit_criterion"
  }
}

Input Schema

NameRequiredDescriptionDefault
roleNo
textNo
actionYes
confirmNo
task_idYesThe search id (task id), e.g. from list_searches or create_search.
versionNoThe spec version from get_search (optional: protects against an edit made meanwhile in the web).
standardNo
criterion_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare non-read-only, non-idempotent, non-destructive, so the description carries most of the behavioral weight and does add value: the recalculation side effect on the estimate, the reversible nature of remove via restore, and the `confirm` flag's specific trigger (sole job-title criterion). The `version` concurrency guard is left to the schema rather than reinforced here.

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?

Everything is packed into one dense sentence with no filler, and the action-by-action breakdown is ordered and front-loaded. The bracketed REST endpoint list is marginal value for an agent and the embedded localized UI labels («Неверно», «Вернуть») add parsing friction, but nothing is truly redundant.

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

Completeness3/5

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

With 8 parameters, 25% schema coverage and no output schema, this is a mutation tool with a lot of surface area. Action semantics are well covered, but the role/standard enums, the effect of `version` conflicts, and what the response returns (updated spec? new estimate?) are not addressed.

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 description coverage is only 25% (task_id and version), so the description must compensate and does: it assigns `text` to the add action, ties role/standard to edit, and explains `confirm` and `criterion_id` contextually. The enum meanings for `role` (required/plus) and `standard` (inference/explicit) remain unexplained anywhere.

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

Purpose4/5

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

The title and opening sentence name a specific verb set (add/edit/remove/restore) and a specific resource (a criterion on a search), and each action is spelled out with its meaning. It stops short of differentiating itself from siblings like edit_search_spec or get_search_requirements, so an agent cannot tell from the description alone which tool owns non-criterion spec fields.

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

Usage Guidelines4/5

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

The 'Before the run' prefix supplies a real precondition: criteria may only be manipulated before the search executes, with the estimate recounted afterwards. It does not name when to prefer a sibling instead, and gives no guidance for post-run attempts, but the timing constraint is concrete enough that usage is largely determined.

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