Skip to main content
Glama

perf_correct

Corrects LLM-generated output by detecting and fixing hallucinations, schema violations, semantic inconsistencies, and instruction drift. Returns corrected content with confidence scores or rejects unfixable errors.

Instructions

General-purpose LLM output correction. Classifies error type (hallucination, schema violation, semantic inconsistency, instruction drift) and applies specialized correction. Use when unsure which specific tool to apply or when output has multiple error types. Returns corrected output with confidence scores, or rejects if unfixable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesThe LLM-generated output to correct.
original_promptNoThe prompt that generated this output. Helps detect instruction drift.
target_schemaNoIf output should conform to a schema, provide for combined correction.
correction_budgetNo'fast': single-pass ~50ms. 'thorough': multi-pass with adversarial verification ~500ms. Default: 'fast'.
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that the tool classifies error types, applies correction, returns confidence scores, and rejects unfixable outputs. It also explains the behavior of the 'correction_budget' parameter (fast vs thorough). This provides good insight into the tool's actions and outcomes.

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 three sentences with no redundant information. It front-loads the primary purpose, then provides usage guidance, and ends with output behavior. Every sentence adds value, making it concise and well-structured.

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 4 parameters, no output schema, and no annotations, the description covers the essential context: purpose, when to use, and return behavior (corrected output with confidence or rejection). It lacks details on error handling or side effects, but for a correction tool with a simple interface, it is adequately complete.

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 coverage is 100% with each parameter described clearly (e.g., 'content' as LLM output, 'original_prompt' for drift detection, 'target_schema' for combined correction, 'correction_budget' with enum values and timing). The tool description does not add additional meaning beyond the schema, so the baseline score of 3 is appropriate.

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 it is a general-purpose correction tool that classifies error types and applies specialized correction. It distinguishes from siblings by explicitly indicating when to use it (when unsure of specific tool or multiple error types), making its purpose and differentiation clear.

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 explicit guidance on when to use this tool ('when unsure which specific tool to apply or when output has multiple error types'). It implies when not to use (when a specific tool is known) but does not explicitly exclude other scenarios, which is sufficient for clarity.

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/Perf-Technology/perf-mcp'

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