Skip to main content
Glama

verify_response

Verify LLM-generated code against an ontological software contract to catch hallucinated or unauthorized method/function calls, returning validation status and violations.

Instructions

Verifies LLM-generated code against an ontological software contract to detect hallucinated or unauthorized method/function calls.

Args: response_code: The Python code snippet or markdown text produced by the model. contract_or_file: Either the rendered contract string OR the path to the original Python file. target_symbol: If contract_or_file is a file path, specify the target symbol to extract its contract.

Returns: Dictionary with validation status, count of violations, and list of invalid calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
response_codeYes
target_symbolNo
contract_or_fileYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/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 discloses the return shape (status, violation count, invalid call list), which is useful, but says nothing about how violations are reported, whether the call can fail on malformed contracts, or any cost/limits. Adequate but shallow 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.

Conciseness4/5

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

Front-loaded one-sentence purpose followed by clean Args/Returns sections; every line carries information. Minor redundancy: the Returns block restates what the output schema already provides.

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?

An output schema exists, so return values needn't be explained, yet the description adds them anyway. Combined with thorough parameter explanation, an agent has enough to invoke the tool correctly; only failure modes and violation-reporting detail are absent.

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 description coverage is 0%, so the description must compensate, and it largely does: it explains response_code as a code snippet or markdown, contract_or_file as either a rendered contract string OR a file path, and target_symbol as conditionally required only when a file path is given. That conditional relationship is genuine added meaning the schema does not convey.

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 precise verb+resource: verifies LLM-generated code against a software contract to detect hallucinated/unauthorized calls. The scope ('hallucinated or unauthorized method/function calls') is specific enough that an agent knows exactly what output to expect, and the unrelated sibling prune_context creates no ambiguity.

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 the description (run it on model-generated code against a contract), but there is no explicit when-to-use, when-not-to-use, or prerequisite guidance. Nothing tells the agent whether this should run before or after execution, or what to do when a contract is unavailable.

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

Deploy Server

Other Tools