Skip to main content
Glama

verify_provenance

Verify LLM-generated code by tracing identifier provenance from context, detecting hallucinated APIs and invented names, and returning an IPD grounding score.

Instructions

Verify that LLM-generated code is grounded in the provided context.

Uses BIPT (Byte-level Information Provenance Tracer) to measure how much of each identifier in the generated code originates from the context. Returns an Identifier Provenance Deficit (IPD) score:

IPD = 0.0 → fully grounded (all identifiers come from context) IPD = 1.0 → fully invented (no identifiers match context)

Use this after an LLM generates code to check for hallucinated APIs, invented function names, or fabricated imports before accepting output.

Args: code: The LLM-generated code to verify context: The repository context that was provided to the LLM

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
contextNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description explains the BIPT method, IPD score range (0.0 to 1.0), and what it checks (identifiers from context). Discloses key behavioral aspects without mentioning permissions or side effects.

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?

Well-structured with clear purpose in first sentence, followed by method and usage. Efficient use of sentences, though the 'Args' list adds slight redundancy.

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?

Tool has output schema, so return value is defined elsewhere. Description adds interpretation of IPD score and use case. For a 2-param verification tool, this is sufficient.

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?

Despite 0% schema description coverage, the 'Args' section adds meaning beyond schema: code is LLM-generated, context is repository context. Explains purpose of each parameter.

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 verifies LLM-generated code grounding in provided context using BIPT and IPD score. It distinguishes from sibling tools like 'verify_response' by focusing on code provenance.

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?

Explicitly states when to use: after LLM generates code to check for hallucinations. Provides context for when it's appropriate, though no explicit when-not or 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/juyterman1000/entroly'

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