Skip to main content
Glama

agda_refine

Preview a refinement for an Agda goal, or apply and typecheck it in one atomic transaction.

Instructions

Preview a refinement, or atomically apply and typecheck it with apply:true

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalYesOpaque goal handle returned by the latest module state
applyNoGuardedly write the proposal and typecheck it in one transaction
asyncNotrue always returns a job handle; false blocks until Agda finishes
timeoutMsNoOverride the configured Agda command timeout for this call
expressionNoExpression to give; empty or omitted requests intro/refine
includeRawNoInclude Agda's native event log; omitted by default because it is large
deferAfterMsNoHow long this call may block before returning a job handle; capped by maxJobWaitMs
usePatternLambdaNo
Behavior2/5

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

With no annotations, the description must carry the full burden of behavioral disclosure. It does mention 'atomically apply and typecheck' which hints at transactional semantics, but it fails to disclose async behavior (async, deferAfterMs), job handles, error handling, or the guarded nature of writes beyond what the schema already says. The description adds minimal context over the schema.

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 sentence, front-loaded with the action, and contains no filler or redundant phrases. Every word contributes to understanding the tool's primary purpose and key mode switch.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 8 parameters, no annotations, and no output schema, the description is too sparse. It does not explain typical workflows, expected results, or edge-case behavior. The schema covers parameter semantics, but the overall usage context remains incomplete, especially for an agent choosing among many similar Agda tools.

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?

Schema description coverage is 88%, so most parameters are already well-documented. The description adds valuable context by clarifying that the default is preview mode and that apply:true switches to atomic apply-and-typecheck, which maps directly to the 'apply' parameter and enhances understanding of the tool's behavior.

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 identifies the tool as Agda's refine operation, with two explicit modes: previewing a refinement or applying and typechecking it atomically with apply:true. This distinguishes it from sibling tools like agda_auto and agda_case_split by naming the specific action and its key parameter.

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?

The description provides no guidance on when to use refine versus alternatives like agda_auto, agda_case_split, or agda_normalize_expression. It lacks any prerequisites, exclusions, or typical invocation scenarios, leaving the agent to infer usage from the name alone.

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

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