Skip to main content
Glama
wrale

mcp-server-tree-sitter

by wrale

get_node_at_position

Locates the Abstract Syntax Tree (AST) node at a specific position in a code file, given project name, file path, and row-column coordinates. Returns node details or None if not found.

Instructions

Find the AST node at a specific position.

    Args:
        project: Project name
        path: File path relative to project root
        row: Line number (0-based)
        column: Column number (0-based)

    Returns:
        Node information or None if not found
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
columnYes
pathYes
projectYes
rowYes
Behavior2/5

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

With no annotations provided, the description carries full burden but only minimally discloses behavior. It states the tool 'finds' a node and returns 'Node information or None', but omits critical details like error handling (e.g., invalid positions), performance characteristics, or what 'Node information' entails. For a tool with 4 parameters and no annotation coverage, this is insufficient.

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 description is appropriately sized and front-loaded with the core purpose. The Args/Returns sections are structured efficiently, though the formatting with indentation could be slightly cleaner. Every sentence adds value without redundancy.

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

Completeness3/5

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

Given the tool's moderate complexity (4 parameters, no output schema, no annotations), the description is partially complete. It covers parameters well and states the return value, but lacks details on error cases, output format, or behavioral nuances. For a tool that interacts with ASTs, more context on what 'Node information' includes would be beneficial.

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 description adds significant value beyond the input schema, which has 0% description coverage. It explains all 4 parameters (project, path, row, column) with clear semantics, including that row/column are 0-based. This fully compensates for the schema's lack of descriptions, making parameters well-understood.

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 clearly states the specific action ('Find the AST node') and resource ('at a specific position'), distinguishing it from siblings like get_ast (which retrieves the entire AST) or get_symbols (which focuses on symbols). The verb+resource combination is precise and unambiguous.

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 usage when needing to locate a node by position in an AST, but provides no explicit guidance on when to use this versus alternatives like get_ast (for full AST) or find_similar_code (for semantic matching). It lacks any 'when-not' or prerequisite information, leaving usage context inferred rather than stated.

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

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wrale/mcp-server-tree-sitter'

If you have feedback or need assistance with the MCP directory API, please join our Discord server