Skip to main content
Glama

validate_code_change

Validates code diffs for security regressions, dangerous patterns, secrets, and AI defense issues to prevent problems before landing.

Instructions

Validate a code diff for security regressions and issues before it lands.

Takes a unified diff and checks for:

  • Security control regressions (auth, CSRF, TLS, rate limiting removal)

  • New dangerous patterns (eval, exec, SQL injection, etc.)

  • Secrets in added code

  • AI defense issues in added code

Returns pass/fail with findings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
diffYes
pathNo.
policyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description bears full responsibility. It states the tool returns pass/fail with findings and lists checks, but does not disclose whether it is read-only, auth requirements, rate limits, or side effects. For a validation/analysis tool, the assumed read-only behavior is not explicitly confirmed.

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 succinct and well-structured, using a one-line summary followed by bullet points for specific checks. Every sentence adds value without redundancy. No unnecessary fluff.

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 description covers the main purpose and checks, and output schema handles return values. However, it omits explanations for the 'path' and 'policy' parameters, which are only present in the schema. Given the complexity of security validation, more contextual detail would help an agent, especially missing guidance on how 'policy' affects validation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must add meaning for parameters. It clarifies the 'diff' param expects a unified diff, but does not explain 'path' (optional, default '.') or 'policy' (optional, default null). This leaves two of three parameters undocumented beyond their names and types.

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 the tool validates a code diff for security regressions and issues before landing. It lists specific security checks (control regressions, dangerous patterns, secrets, AI defense), distinguishing it from sibling tools like security_scan or remediate, which likely target different stages or scopes.

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?

The description implies use before code lands ('before it lands'), but does not explicitly state when to use this tool versus alternatives like security_scan or quality_check. No exclusions or when-not-to-use guidance is provided, leaving the agent to infer usage context.

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/duriantaco/skylos'

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