Skip to main content
Glama

agda_refine

Refines Agda goals using the server mutation policy; preview or override the policy to apply changes, with optional async and timeout controls.

Instructions

Refine using the server mutation policy; apply overrides that policy

Input Schema

NameRequiredDescriptionDefault
goalYesOpaque goal handle returned by the latest module state
applyNoOverride the server policy: true applies/typechecks; false previews
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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / apply / description
      Previous value: -"Guardedly write the proposal and typecheck it in one transaction"New value: +"Override the server policy: true applies/typechecks; false previews"
  2. First observedv0.3.0

TDQS

C2.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It hints that the operation is governed by a server mutation policy and can be overridden, but never states what is mutated, whether a preview is a dry run, or what a job handle implies — and the apply/override point is already spelled out in 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.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single short sentence with no padding, but the second clause duplicates what the schema already says about `apply`, so one of the two clauses does not earn its place. Being brief here reads as under-specification rather than efficiency.

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?

This is an 8-parameter mutating tool with no annotations and no output schema; the description should at least explain the refine operation, the preview-vs-apply default, and whether a job handle or inline result comes back. The rich schema covers parameters, but the core operation and mutation semantics remain unexplained.

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?

Schema description coverage is 88%, so nearly every parameter (goal, apply, async, expression, deferAfterMs, includeRaw) is already documented in the schema. The description adds nothing parameter-specific beyond repeating the apply override, so the baseline 3 applies.

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

Purpose2/5

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

"Refine using the server mutation policy" largely restates the tool name and adds a policy reference, but never says what is being refined (a goal hole / metavariable) or what refinement means in Agda terms. It gives no basis for distinguishing it from siblings like agda_auto, agda_case_split, or agda_infer_type.

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 only usage-adjacent statement is "apply overrides that policy," which describes a parameter rather than when to choose this tool. There is no mention of when to use refine versus auto, case_split, or infer_type, and no prerequisite such as requiring a loaded module or goal handle.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.