Skip to main content
Glama

code_task

Maps a coding goal to candidate files, structure, and impact before any edit, then routes to read, patch, and check steps. Pass English identifier guesses as search terms for non-English goals.

Instructions

Start here for any change: goal → candidates + structure + impact. Does not itself edit or check; then code_read → code_patch / code_batch → code_check. Matching is literal, not Chinese semantics: pass search_terms (English identifier guesses, hypotheses) for a non-English goal.

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": {
      "workspace_dir": "<workspace_dir>",
      "goal": "<goal>"
    },
    "name": "code_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
goalYesCoding goal.
routeNoInferred when omitted.
targetNoAnchor {file, symbol, line}.
request_idNoCorrelation id.
search_termsNoEnglish identifier guesses for a non-English goal (≤8). HYPOTHESES, not verified names.
workspace_dirYesProject root (abs).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.1
    • changedInput schema / properties / search_terms / description
      Previous value: -"Extra terms (≤8)."New value: +"English identifier guesses for a non-English goal (≤8). HYPOTHESES, not verified names."
  2. Addedv0.5.28

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses that the tool does not itself edit or check, and that matching is literal rather than semantic, which is a real behavioral constraint an agent must plan around. It stops short of describing side effects, caching, or performance characteristics.

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 text is dense and front-loaded, leading with the entry-point role and the output summary before the workflow chain. The arrow notation is efficient but borders on cryptic, and the non-English matching caveat is packed into one long clause.

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

Completeness4/5

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

For a six-parameter tool with a nested target object and no output schema, the description compensates by naming what comes back (candidates, structure, impact) and by clarifying the tool's non-mutating nature. The route enum values are left to the schema, which is acceptable given full coverage.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents goal, route, target, search_terms, and workspace_dir. The description's note that search_terms are English identifier hypotheses largely restates the schema's own wording, adding little beyond it. Baseline 3 is appropriate.

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 description states a specific role: an entry point that turns a goal into candidates, structure, and impact, and explicitly says it does not edit or check. That distinguishes it from code_patch/code_check siblings. It is slightly abstract about the exact output shape, but the verb-plus-resource intent is clear.

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?

It gives an explicit entry condition ('Start here for any change') and lays out the follow-on sequence code_read → code_patch/code_batch → code_check, so an agent knows both when to call it and what to call next. It also gives a concrete rule for non-English goals via search_terms.

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