Skip to main content
Glama

promptshift_validate_ast

Evaluate semantic AST fidelity and measure prompt drift between original and transpiled agent instructions to verify cross-IDE parity and detect omitted constraints.

Instructions

Evaluate semantic AST fidelity and measure prompt drift percentage between an original agent instruction document and its transpiled counterpart. Use this tool to verify cross-IDE parity and detect omitted constraints after rule conversion. Do not use for code compilation or syntax execution. Returns a normalized fidelity score (0-100%).

Input Schema

NameRequiredDescriptionDefault
source_textYesThe original agent instruction or rule document before transpilation.
target_textYesThe converted target rule document to benchmark for semantic equivalence.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does disclose that the operation is a pure analysis (explicitly not compilation or syntax execution) and that it returns a normalized fidelity score on a 0-100% scale. It does not say what happens on malformed input, whether the analysis is deterministic, or how drift is computed, so the behavioral picture is good but not complete.

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?

Three sentences, each doing distinct work: what it measures, when to use/exclude, and what it returns. The core operation is front-loaded in the first clause and there is no filler.

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?

For a two-parameter, no-output-schema tool with no annotations, the description covers purpose, trigger conditions, exclusions, and the shape of the return value — enough for an agent to call it correctly. It stops short of explaining the score's interpretation or failure modes, which would be needed for a full 5.

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 source_text and target_text are already fully documented as the original and converted documents. The description restates their relationship (original vs transpiled counterpart) but adds no formatting, size, or validation detail beyond the schema, so the baseline 3 applies.

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 gives a precise verb+resource pair — evaluate semantic AST fidelity and measure prompt drift between an original instruction document and its transpiled counterpart — so the agent knows exactly what operation is performed. It implicitly separates itself from promptshift_transpile (conversion) and promptshift_sanitize_secrets (redaction) by framing itself as post-conversion verification, but never names those siblings to make the routing explicit.

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?

"Use this tool to verify cross-IDE parity and detect omitted constraints after rule conversion" gives a clear positive trigger, and "Do not use for code compilation or syntax execution" gives an explicit exclusion. It lacks a named alternative (e.g. 'use promptshift_transpile to produce the target first'), which keeps it short of a 5.

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