Skip to main content
Glama

agda_refine

Refine a goal in an Agda file by filling it with an expression, which may generate new subgoals. Specify the file path and goal ID to apply the refinement.

Instructions

Refine a goal by filling it with an expression that may create new subgoals.

If expr is empty, Agda tries to refine using the goal type. Call agda_load afterwards to refresh goals.

Args: file_path: Absolute path to the .agda file goal_id: The goal/hole number (from agda_load output) expr: Expression to refine with (can be empty)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exprNo
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 exist, so the description must elucidate behavior. It mentions subgoal creation and empty expr behavior, and the need to reload. But it omits failure modes, file modification details, and permission/state effects.

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 and well-structured: a one-line summary, key caveats, and an Args list. No redundant statements.

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?

The description covers core behavior, optional expression, and the post-requisite of calling agda_load. With an output schema present, return values are not needed. It lacks cross-referencing to sibling tools, which would help an agent choose between refine, give, and auto.

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?

The description provides a dedicated Args section explaining all three parameters, including critical context (goal_id comes from agda_load output, expr can be empty). This far exceeds the bare input schema, compensating fully for the 0% schema coverage.

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 opening line uses a specific verb ('refine') and resource ('goal'), and notes that it may create subgoals, which distinguishes it from sibling tools like agda_give or agda_auto. This clearly states what the tool does.

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?

It clearly describes the tool's behavior and instructs to call agda_load afterward to refresh goals, giving context for sequencing. However, it does not explicitly state when to prefer this over siblings like agda_give or agda_refine_or_intro.

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