Skip to main content
Glama

kilo_log_decision

Records orchestration routing and outcome decisions to a JSONL log so metrics can summarize delegation versus inline choices, escalations, discarded runs, and follow-up rates.

Instructions

Record an orchestration routing or outcome decision to decisions.jsonl under DATA_DIR so kilo_metrics can summarize delegation vs inline choices, escalations, discarded runs, and inline follow-up rates.

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": {
      "branch": "<branch>",
      "reason": "<reason>"
    },
    "name": "kilo_log_decision"
  }
}

Input Schema

NameRequiredDescriptionDefault
branchYesOrchestration branch taken: 'delegate' | 'inline' | 'escalate' | 'discarded'.
reasonYesWhy this branch was chosen (or why a run was escalated/discarded).
run_idNoOptional run_id / task_id from kilo_implement when logging delegate/escalate/discarded.
task_refNoOptional task identifier (e.g. T001, 02.3) or file reference.
followup_neededNoTrue if an inline edit or delegated run required an immediate follow-up fix.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the burden and does disclose the key side effect: appending a record to decisions.jsonl under DATA_DIR, i.e., a persistent file write. It does not say whether the file is created if absent, what happens on write failure, or whether entries are idempotent, which are meaningful gaps for a mutation tool with zero annotation coverage.

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?

A single front-loaded sentence that moves from action to destination to downstream purpose with no filler. It is dense but every clause earns its place.

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 5-parameter logging tool with a 100%-covered schema and an output schema present, the description supplies the essential missing context: what is recorded, where, and who consumes it. Remaining gaps are file-creation behavior and failure handling rather than anything required to invoke it correctly.

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 coverage is 100%, so the schema itself documents branch values, reason, run_id, task_ref, and followup_needed. The description adds only indirect meaning by listing the outcomes kilo_metrics derives (delegation vs inline, escalations, discarded runs, follow-up rates), which loosely corresponds to the branch and followup_needed fields rather than explaining them.

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 ('Record an orchestration routing or outcome decision'), names the exact destination (decisions.jsonl under DATA_DIR), and names the downstream consumer (kilo_metrics). This distinguishes it clearly from kilo_log_issue, which logs issues rather than routing decisions.

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

Usage Guidelines3/5

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

Usage is implied through the mention of delegation vs inline choices, escalations, discarded runs, and inline follow-up rates, which map to when a decision should be logged. However, there is no explicit 'call this when X, not Y' guidance and no statement of prerequisites or when not to log.

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