Skip to main content
Glama
markup-carve

carve-mcp

Official
by markup-carve

Find AST nodes by semantic selector

carve_select_ast_nodes
Read-only

Resolve a heading ID, footnote label, node type, or AST path to precise AST paths, surfacing ambiguous matches for explicit review instead of silent selection.

Instructions

Resolve a heading ID, footnote label, node type, or current AST path to reviewable PART 12 AST paths without silently choosing among multiple matches.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
astYesPART 12 AST (maximum 1000000 JSON bytes)
selectorYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
matchesYes
selectorYes
truncatedYes
matchCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.5
    • changedInput schema / properties / selector / properties / kind / enum
      Previous value: -[
      -  "heading-id",
      -  "footnote-label",
      -  "node-type"
      -]New value: +[
      +  "heading-id",
      +  "footnote-label",
      +  "node-type",
      +  "ast-path"
      +]
    • changedInput schema / properties / selector / properties / value / maxLength
      Previous value: -256New value: +4096
    • changedOutput schema / properties / selector / properties / kind / enum
      Previous value: -[
      -  "heading-id",
      -  "footnote-label",
      -  "node-type"
      -]New value: +[
      +  "heading-id",
      +  "footnote-label",
      +  "node-type",
      +  "ast-path"
      +]
    • changedOutput schema / properties / selector / properties / value / maxLength
      Previous value: -256New value: +4096
  2. Addedv0.1.4

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover read-only and non-destructive behavior, and the description adds valuable transparency by disclosing that it does not silently choose among multiple matches, surface ambiguity instead. This goes beyond what the annotations state and helps the agent anticipate behavior when multiple nodes match.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that is front-loaded with the action and resource. It contains no filler and efficiently communicates both the main purpose and a key behavioral guarantee.

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?

Given that the tool has an output schema and annotations covering safety profile, the description is largely sufficient for an agent to call it correctly. It conveys the core selection behavior and the ambiguity-handling rule. Minor gaps like no-match behavior or error semantics are not critical because the output schema likely covers return structure.

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?

The description adds minimal semantic meaning to the parameters by naming the selector kinds ('heading ID, footnote label, node type, or current AST path'), which are already enumerated in the schema's enum. It does not clarify the expected format or syntax for the value field, and the 'ast' parameter is already described in the schema. Schema coverage is only 50%, but the description only partially compensates.

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?

The description states a specific action ('Resolve') on a specific resource ('AST paths') with clear input types ('heading ID, footnote label, node type, or current AST path'). It also distinguishes itself from siblings by adding the constraint 'without silently choosing among multiple matches', which differentiates it from patch/apply tools.

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?

The description implies when to use the tool (when you have a semantic selector and need reviewable AST paths) but does not explicitly state when not to use it or mention alternative tools. No exclusions or comparison with sibling tools are provided, leaving the agent to infer usage context.

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