Skip to main content
Glama
guardvibe

guardvibe

by goklab

fix_code

Analyze vulnerable code and return before/after patch suggestions with structured edit instructions, line numbers, severity, and confidence so agents can apply fixes; use verify to confirm resolution.

Instructions

Pass vulnerable code as a string and get fix suggestions with before/after patches. Returns structured edit instructions (line numbers, severity, confidence). Use verify_fix afterwards to confirm the fix resolved the issue. Example: fix_code({code: '...', language: 'typescript'})

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "code": "<code>",
      "language": "<language>"
    },
    "name": "fix_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesThe code snippet to analyze and fix
formatNoOutput format: json (for agent auto-fix) or markdown (human review)json
languageYesProgramming language of the code
frameworkNoFramework context (e.g. express, nextjs, fastapi, react, django)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.66.0
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose meaningful behavior: it returns structured edit instructions rather than applying changes, and it reports line numbers, severity, and confidence. It still doesn't state explicitly that no files are modified (read-only), nor any limits on code size or latency, so a small gap remains for a no-annotation tool.

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?

Front-loads purpose and output shape in the first sentence, then workflow and an example. Every sentence contributes; nothing is padding.

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?

There is no output schema, so the description usefully summarizes the return value (before/after patches, line numbers, severity, confidence). Combined with 100% schema coverage, an agent has nearly everything needed; only an explicit read-only/does-not-modify-files statement is missing.

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%, so the schema already documents all four parameters including the format enum tradeoff (json for agent auto-fix vs markdown for human review). The description adds only a usage example with code and language, not new meaning about format or framework, so baseline 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?

States a specific verb and resource ('fix_code' → get fix suggestions with before/after patches) and clarifies the input form (code as a string) and output shape (structured edit instructions with line numbers, severity, confidence). An agent can distinguish it from detection-only siblings like check_code and from the follow-up verifier verify_fix without opening the schema.

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?

Explicitly names the follow-up step ('Use verify_fix afterwards to confirm the fix resolved the issue'), which gives a clear workflow position. However, it does not state when to prefer fix_code over check_code, secure_this, or explain_remediation, so the initial routing decision is left implicit.

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