Skip to main content
Glama

compare-versions

Compares old and new source code to confirm fixes resolved earlier security findings or identify newly introduced issues.

Instructions

Compare two versions of code to see if fixes resolved previous findings or introduced new issues.

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": {
      "old_code": "<old_code>",
      "new_code": "<new_code>"
    },
    "name": "compare-versions"
  }
}

Input Schema

NameRequiredDescriptionDefault
new_codeYesUpdated source code
old_codeYesOriginal source code

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description bears the full behavioral burden. It does not say whether the comparison re-runs a full audit, how depth or scope is determined, whether the operation is read-only, or what the result looks like — and there is no output schema to fall back on.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

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

A single front-loaded sentence with no filler, opening on the action verb and closing on the outcome the caller cares about. Only minor imprecision in "versions of code" versus the schema's old/new code framing.

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

Completeness3/5

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

The tool is simple (two required string params, no nesting, no output schema), and the schema fully documents inputs. However, with no output schema the description should disclose the shape of the comparison result, and it only gestures at "findings" and "new issues" without characterizing them.

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 both old_code and new_code documented as original and updated source. The description adds the analytical intent behind the pairing but no format, size, or ordering constraints beyond what the schema already states. Baseline 3 applies.

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

Purpose4/5

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

The description names a specific verb ("Compare") and resource ("two versions of code"), and frames the intent as detecting whether fixes resolved prior findings or introduced new issues. This is distinct from siblings like audit-program or generate-fix, though it never explicitly contrasts itself with them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by "see if fixes resolved previous findings or introduced new issues," which suggests running it after applying a fix. There is no explicit when-not guidance, no prerequisite statements, and no named alternative for a single-version audit.

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