Skip to main content
Glama

lookup_definition

Retrieve a named definition's source location, type, doc comment, and kind from a .hird file for compiler introspection.

Instructions

Look up a top-level definition by name: source location, type, doc comment, and kind.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesPath to a .hird source file.
nameYesThe definition's name.
Behavior3/5

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

Since no annotations are present, the description carries the full burden. It adequately discloses the behavior and expected outputs (source location, type, doc comment, kind), and the term 'look up' strongly implies a read-only operation. It does not explicitly describe what happens when definition is not found, but that's not essential.

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 clear sentence that front-loads the verb and resource, then lists the output fields concisely. Every word contributes meaning; there is no padding or repetition of the schema.

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 small two-parameter read-only lookup tool, the description covers the essential action and return detail without an output schema. It could additionally mention how failure cases surface (e.g., unknown definition), and it does not state it is read-only, but overall it's nearly complete.

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 input schema already describes both parameters at 100% coverage, so the schema carries the heavy lifting. The description adds only that the lookup applies to a 'top-level' definition, which slightly clarifies 'name' but not indispensably. No extra examples or constraints are added.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb ('Look up') and a well-specified resource ('top-level definition'), plus the fields returned (source location, type, doc comment, kind). It reasonably distinguishes from sibling tools because infers focus on deeper analysis and 'get_context_for_symbol' implies context rather than definition lookup, but it does not explicitly name siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use / when-not-to-use guidance is given. The description implies it is for definition lookup but never says when to prefer it over 'get_context_for_symbol', so ('infer_type', or 'explain_effect_row' is needed. An agent is left to infer the intended scenario from the name and parameters.

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

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/no-materials/hird'

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