Skip to main content
Glama

Gate AI-written code

validate_ai_output
Read-onlyIdempotent

Gate AI-written code with a binary verdict: reject unsafe, mocked, or invented-API code, and score performance, scalability, reliability, and tech debt via a frontier-model review.

Instructions

The merge gate for AI-written CODE: returns a binary approve/reject verdict with veto power — e.g. it rejects code calling the nonexistent stripe.Inventory API, or an N+1 loop with the latency arithmetic to prove it. Deterministic reality gates (mock/placeholder veto, gaming and bypass detection, invented-API checks) run first and cannot be overridden; a frontier-model review (ISO/IEC 25010) then scores performance, scalability, reliability and tech debt. Read-only: the code is analyzed, never executed. Call it on every AI-generated diff before accepting it; use validate_plan for plans, analyze_code for an advisory report without a verdict.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contextNoOptional review context, e.g. {"language": "cpp", "scale": "10k req/s"}. 'language' sharpens SDK-reality checks.
ai_outputYesThe AI-generated code to gate — a diff, function or whole file. Plain source text, any mainstream language.
validation_typeNo'code_generation' (default) for source code; 'text' for prose output such as documentation or commit messages.code_generation

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
scoreYesCombined score 0-100 (gates fused with the model review)
validYesThe binary verdict: true = approved, false = rejected
issuesYesSeverity-ranked findings, each 'severity|category|detail' with the reasoning
providerNoModel that ran the deep review, or 'protection-gates-only'
confidenceNoscore / 100
protectionNoDeterministic gate result. A veto here is final — the model review cannot override it.
suggestionsNoConcrete fixes to reach approval
Behavior5/5

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

Annotations already declare readOnly, idempotent, and non-destructive, but the description goes further by stating 'Read-only: the code is analyzed, never executed,' explaining deterministic gates with veto power that 'cannot be overridden,' and describing the frontier-model scoring dimensions. This is rich behavioral context beyond the annotations.

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 compact but information-dense. The core verdict mechanism is front-loaded; subsequent sentences add behavior, use-case guidance, and alternatives without redundancy. Every sentence contributes distinct value.

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 an output schema exists, the description doesn't need to explain return values. It covers purpose, when to use, safety behavior, parameter nuances, and examples of rejection logic. The tool is fully contextualized for an agent.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents all three parameters. The description adds value by explaining that context 'language sharpens SDK-reality checks' and by distinguishing validation_type options ('code_generation' vs 'text'), deepening meaning beyond enum labels.

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: 'The merge gate for AI-written CODE: returns a binary approve/reject verdict.' It immediately distinguishes the tool from siblings by naming validate_plan and analyze_code as alternatives for different tasks.

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

Usage Guidelines5/5

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

Explicit invocation guidance is given: 'Call it on every AI-generated diff before accepting it.' It also provides clear when-not/when-else direction: 'use validate_plan for plans, analyze_code for an advisory report without a verdict.' This fully covers selection vs alternatives.

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/Verificate-Dev/verificate-mcp-quickstart'

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