Skip to main content
Glama

Fix Code

fix_code
Read-only

Submit broken code with compiler errors or review comments to receive a corrected version addressing all reported issues. Review the fix before accepting.

Instructions

Fix bugs in code based on errors or review feedback.

Provide the broken code along with compiler/runtime errors and/or reviewer comments. The local model will return a corrected version that addresses all reported issues.

IMPORTANT: Always review the returned fix before accepting it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe code that contains bugs or issues.
errorsNoCompiler errors, runtime exceptions, or test failure output. Paste the exact error messages.
languageYesProgramming language of the code.
max_tokensNoMax tokens override.
temperatureNoTemperature override.
review_commentsNoCode review feedback describing what's wrong and what needs to change. Be specific about the issues.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoThe generated artefact (code, tests, documentation). None on failure.
errorNoHuman-readable error message. None on success.
successYesWhether the generation completed successfully.
metadataNoAuxiliary data: token usage, elapsed time, quality warnings, etc.
Behavior4/5

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

The annotations already provide readOnlyHint=true, and the description adds useful behavioral context by noting that the local model 'will return a corrected version' and that the agent should 'Always review the returned fix before accepting it.' This warns about the model's fallibility without contradicting the read-only annotation.

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 short, purposeful paragraphs: what the tool does, what inputs to provide, and an important caution. The 'IMPORTANT' warning earns its place and is not excessive. There is no redundant filler.

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

Completeness5/5

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

Given the tool's simplicity, its output schema availability, and the annotations, the description is complete. It specifies required inputs, the expected output behavior, and a review caution. Nothing essential is missing for an agent deciding whether and how to call this tool.

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 100%, and the schema already describes code, errors, language, review_comments, and optional overrides. The description echoes the input requirements but does not add new parameter-level details beyond what the schema provides, so the baseline score of 3 applies.

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 opens with a specific verb and resource: 'Fix bugs in code based on errors or review feedback.' This clearly distinguishes fix_code from siblings like refactor_code (which implies improving structure rather than fixing bugs) and implement_code (which implies creating new code). The purpose is unambiguous.

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 provides clear usage context: 'Provide the broken code along with compiler/runtime errors and/or reviewer comments.' It tells the agent what inputs are needed and what will be returned. However, it does not explicitly name sibling tools or state when not to use it, so it stops short of full alternative routing.

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/shreyashp77/Llama-Bridge'

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