Skip to main content
Glama

List grammar node types

get_node_types

Inspect a language grammar to list named node types, anonymous tokens, and field names, enabling accurate ast_search query patterns without trial and error.

Instructions

List named node types, anonymous tokens and field names for a language's grammar — use it to write correct ast_search query patterns without trial and error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNofile path (alternative to language)
languageNolanguage to inspect
Install Server

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It implicitly signals a read-only operation through the verb 'List' and tells the agent what will be returned, but it does not explicitly disclose side-effect profile, return format, or any prerequisites around file versus language selection.

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 focused sentence that front-loads the resource being listed and adds a practical usage note. Every clause earns its place; there is no filler.

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 simple read-only listing tool with two well-described optional parameters and no output schema, the description conveys the purpose, the returned content, and the primary usage context. It lacks explicit return formatting details, but the schema already explains the parameter alternatives.

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 description coverage is 100%, with both 'file' and 'language' already described in the input schema. The description itself adds no parameter-level detail, so the baseline 3 applies.

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 names a specific resource — 'named node types, anonymous tokens and field names' — with a clear verb, 'List'. The clause about writing 'correct ast_search query patterns' ties it to a concrete use case and differentiates it from the sibling ast_search tool.

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?

The description gives explicit context: use this tool before ast_search to avoid trial and error. It does not explicitly state when not to use it or name alternative tools, so it falls just short of full exclusion guidance.

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

Other 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/zhaoxingxing06/kimi-tree-lens'

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