Skip to main content
Glama

agda_infer_in_goal

Infer the type of an expression within a goal's local context, using locally-bound variables, to type-check Agda code during proof development.

Instructions

Infer the type of an expression in the context of a specific goal.

Unlike agda_infer which works at top level, this infers within a goal's local context (with access to locally-bound variables).

Args: file_path: Absolute path to the .agda file goal_id: The goal/hole number (from agda_load output) expr: The expression to type-check

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exprYes
goal_idYes
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries the burden. It discloses that it works in a goal's local context with locally-bound variables, and contrasts with top-level inference. However, it doesn't mention prerequisites like needing an active agda_load or handling invalid goal IDs, limiting behavioral transparency.

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 concise and well-structured: a clear opening sentence, one comparative sentence for differentiation, and a compact Args list. No fluff.

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 typed expression tool with 3 fully documented parameters, an output schema, and clear differentiation among many siblings, the description is quite complete. It could mention preconditions (e.g., file loaded via agda_load), but the goal_id reference hints at it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema properties lack descriptions (0% coverage), but the description's Args section explains each parameter: file_path as absolute path, goal_id from agda_load output, and expr to type-check. This fully compensates for the schema gap.

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 'Infer the type of an expression in the context of a specific goal.' This is a specific verb+resource+context, and it explicitly contrasts with agda_infer, distinguishing it from a sibling tool.

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

Usage Guidelines5/5

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

It explicitly says 'Unlike agda_infer which works at top level, this infers within a goal's local context (with access to locally-bound variables).' This names the alternative and clarifies the appropriate context.

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