Skip to main content
Glama

kb_repair

Find notebook notes that are written but unreachable because required anchor symbols or verified flow paths are missing, then repair each listed note with kb_write.

Instructions

List the notebook notes that are WRITTEN BUT UNFINDABLE — missing the fields a note cannot be retrieved without (anchor symbols, a flow's verified paths). Notes written before those fields were required are correct but unreachable, and this is how they get found.

Returns a worklist, never a change: repairing is your work, because every gap needs a judgement about the code (which words a reader would search for, which symbols the note is actually about, which files you can honestly claim to have read). Fix each one with kb_write, passing the note's id — fields merge, so nothing already in the note is lost.

A clean notebook returns "Nothing to repair here." Run it when the user asks to repair, fix, or clean up the notebook.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "kb_repair"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.4

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it declares the tool is read-only ("Returns a worklist, never a change"), explains why the repair is delegated to the agent, and documents the empty-state response ("Nothing to repair here."). It omits ordering, pagination, or size limits on the worklist, which keeps it from a 5.

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?

Front-loaded with the core definition and the read-only guarantee, then workflow, then trigger — a sensible order. The parenthetical list of judgement examples ("which words a reader would search for, which symbols the note is actually about...") is illustrative but slightly verbose for what it adds.

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 zero-parameter, no-annotations, no-output-schema tool, the description covers purpose, safety profile, empty state, and the remediation path. It does not describe the shape of each worklist entry (which fields will be flagged), which is the one thing an agent must inspect to act on results.

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?

The tool takes zero parameters, so there is nothing for the description to disambiguate; the only identifier mentioned (`id`) belongs to the downstream kb_write call, not this one. Baseline 4 applies for a parameterless tool.

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 ("List the notebook notes") plus a precise scope qualifier: notes that are written but unfindable because they lack anchor symbols or verified paths. This is a scope no sibling (kb_lookup, kb_search) covers, and the description makes the distinction explicit with "this is how they get found."

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?

Gives a concrete trigger ("Run it when the user asks to repair, fix, or clean up the notebook") and names the follow-up tool, kb_write, with the exact argument to pass (`id`). It does not explicitly exclude alternatives such as kb_search or kb_status, but the workflow routing is otherwise clear.

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

Deploy Server

Other Tools