Skip to main content
Glama

agda_infer

Infer the type of an Agda expression within a specific file's context, providing type-checking results directly in your development workflow.

Instructions

Infer the type of an expression in the context of a loaded file.

Args: file_path: Absolute path to the .agda file (for scope) expr: The expression to type-check (e.g. "add", "suc zero")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exprYes
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations provided, the description carries the full burden of disclosing behavior. It only states the basic action and param meanings, but does not mention what the tool returns, whether it requires the file to be loaded first, or how it handles errors. It lacks details like side effects, permissions, or output context.

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 compact, with a clear purpose statement and an args list that maps directly to the schema. Every sentence serves a function—no filler or redundancy.

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 the tool's low-to-moderate complexity, the presence of an output schema, and the absence of annotations, the description covers the essential context: purpose and parameters. It signals the 'loaded file' prerequisite, which is important. However, it could be more explicit about whether the file must be loaded via agda_load first and what happens if not, but the description is largely complete for its simplicity.

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 input schema provides only names ('file_path', 'expr') with 0% description coverage, so the description must compensate. It does this effectively by specifying 'file_path' as an absolute path for scope and giving concrete examples for 'expr'. This adds meaningful context beyond the schema, though it could be more explicit about the exact syntax expected.

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 a specific action ('Infer the type of an expression') on a specific resource ('in the context of a loaded file'), which differentiates it from sibling tools like agda_compute or agda_goal_type. The scope is well-defined, and examples for expr reinforce its purpose.

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 provides clear context: this tool is for type inference in the context of a loaded file, which implies a prerequisite that the file is loaded. It does not explicitly name alternatives or exclusions, but the context is sufficient to distinguish it from siblings like agda_infer_in_goal.

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/DreamLinuxer/agda-mcp'

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