Skip to content

feat(mcp): describe every tool input and when to use each tool - #402

Merged
rrrodzilla merged 4 commits into
mainfrom
feat/400-describe-mcp-inputs
Nov 30, 2026
Merged

rrrodzilla merged 4 commits into
mainfrom
feat/400-describe-mcp-inputs

Conversation

@rrrodzilla

Copy link
Copy Markdown
Contributor

Closes #400.

What changes

  • Inputs: all 710 top-level inputs of the 183 published tools, and every nested property, now have a description: format, the tool that returns an ID, revision, token or digest, and the default. Shared value types (company, account code, dates, IDs, references, month, setup generation and others) are described once at the type.
  • Tools: 123 tool descriptions are rewritten or extended. Each says when to use the tool instead of its neighbors (posting, statements, reconciliation and clearing, documents, expense claims, fixed assets, show/list pairs), what a change fixes or locks, and how it is corrected.
  • Union selectors: the synthesized report.kind and txn_clear.target explain each value from its branch description.
  • Publishing: wrapped doc comment lines publish as one line. A connection whose grant lists fewer tools drops each routing sentence that names a tool it does not list. The first sentence is always kept and never names a tool that changes the books.
  • Docs: references/commands.md gains "Choose between neighboring tools" with a correction table per journal kind; SKILL.md points to it.

No tool, input type, schema shape or ledger behavior changed. Published schemas compared with descriptions stripped are identical for all 183 tools.

Tests

  • mcp::input_description_tests fails when a published input, at any depth, has no description. SELF_EVIDENT is the explicit allow-list and is empty.
  • mcp::neighbors covers the per-connection trimming, the first-sentence rule and abbreviations that would split a sentence.
  • mcp::catalog checks that no published description contains a line break.
  • Local: fmt, clippy -D warnings, cargo nextest run --workspace 1698/1698.

Known gaps, out of scope here

  • Two schemas are looser than validation: OCR confidence publishes a maximum of 255 but accepts 0 to 100; the inventory document line publishes 0 to 65535 but requires 1 to 1000. The descriptions state the enforced limits.
  • Input descriptions may name a write tool as an ID source (for example "as returned by txn_post") on read-only connections. Only tool descriptions are trimmed per connection.

Every input of the 183 published MCP tools now carries a description,
top level and nested: its format, the tool that returns an ID, revision,
token or digest, and its default. Tool descriptions say when to use a
tool instead of its neighbors, what a change fixes or locks, and how it
is corrected.

- The synthesized kind and target selectors of report and txn_clear
  explain each value from its branch description.
- Wrapped doc comment lines publish as one line.
- A connection whose grant lists fewer tools drops each routing
  sentence that names a tool it does not list; the first sentence of a
  description is always kept.
- A catalog test fails when a published input has no description, with
  an explicit allow-list for self-evident inputs (empty today).
- commands.md gains a guide to choosing between neighboring tools and
  to correcting each kind of journal; SKILL.md points to it.

No tool, input type, schema shape or ledger behavior changed.

Closes #400
Each wording below was checked against the code that consumes the input.

- txn_clear status: uncleared deletes the entry's clearings, or only
  those carrying the statement, and is refused for clearings locked by a
  completed statement until its receipt is undone.
- ledger_setup_begin name: 1 to 63 lowercase letters and underscores,
  starting and ending with a letter.
- account_list from and to: ignored unless with_balances is true; from
  must be on or before to.
- ledger_setup_book_update supersedes: profile.revision from
  ledger_setup_book_show.
- security_create currency defaults to USD; summary stale holds use a
  strict 7-day default.
- cash-forecast link_sources: join the scheduled_source_id and
  document_source_id of a possible_overlaps row.
- payroll export_json: spell out the accepted Gusto totals form.
- bookkeeping_policy_show and _set: the policy is an instruction for
  agents and is not applied to postings.
- demo_ledger_create: correct the fallback account and currency default
  wording, and cover the demo host tool in the description test.

Refs #400
demo_host_tool_provisions_only_the_host_managed_path failed on the macOS
runner with reqwest Decode TimedOut. Creating the demo ledger is
CPU-bound: an unoptimized test build takes about 1 s for the call alone
and about 2 s with three tests in parallel, and the call ran past the
shared client's 5-second limit on the slower 3-core runner. Running the
whole mcp_http file unoptimized on 24 cores reproduces the failure
locally.

The demo calls now carry their own one-minute limit, which still fails a
hung call. Every other request keeps the 5-second client limit. The same
run passes three of three with the change.
@rrrodzilla
rrrodzilla merged commit 62351df into main Nov 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Describe every MCP tool input and when to use each tool, to raise the Glama tool quality grade

1 participant