Skip to main content
Glama
Leeroo-AI

Leeroopedia MCP Server

Official
by Leeroo-AI

verify_code_math

Check code against documentation and reference implementations to catch logic errors, off-by-one bugs, and API contract mismatches. Returns a Pass/Fail verdict with discrepancy analysis.

Instructions

Verify code correctness against knowledge base documentation and reference implementations.

Checks your code against documented behavior, reference implementations, and API contracts — catching errors before they become bugs.

Use this tool when you need:

  • Verification that code correctly implements a concept, algorithm, or API contract

  • Detection of logic errors, off-by-one mistakes, or wrong assumptions

  • Comparison against reference implementations or documented behavior

Returns: verdict (Pass/Fail), analysis of discrepancies.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
code_snippetYesThe code to verify
concept_nameYesThe concept, algorithm, or API being implemented (e.g., 'GPU memory allocation for vLLM', 'YAML config validation for ROLL')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.9

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It does disclose the return shape (verdict Pass/Fail plus discrepancy analysis), which is useful. However it says nothing about permissions, whether the check is read-only, latency/cost, or how the knowledge base lookup behaves — gaps for a tool with zero annotation coverage.

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?

Purpose is front-loaded in the first sentence, followed by a scannable bullet list of use cases and a short Returns line. The only filler is the mildly promotional clause 'catching errors before they become bugs.' Structure is otherwise tight and well ordered.

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?

With no output schema, the description correctly compensates by stating the return value (Pass/Fail verdict plus discrepancy analysis). For a two-parameter verification tool this covers what an agent needs to invoke it and interpret results. The absence of any behavioral/permission context keeps it from being fully complete.

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 both parameters, including concrete examples for concept_name. The description adds no further syntax, format, or sizing guidance for code_snippet or concept_name. Baseline 3 applies when the schema does the heavy lifting.

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 opens with a specific verb+resource: verifying code correctness against knowledge base documentation and reference implementations. That is clearly distinct from sibling tools like search_knowledge or diagnose_failure. It stops short of explicitly naming or excluding any sibling, so it does not reach the top tier.

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?

The 'Use this tool when you need:' block gives three concrete triggering scenarios (verifying concept/algorithm/API implementation, detecting logic errors, comparing to reference implementations). This is clear context for selection. It offers no explicit when-not-to-use guidance and names no alternative tool (e.g. diagnose_failure) for overlapping cases.

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