Skip to main content
Glama

Validate a PTPGE document

ptpge_validate_document
Read-onlyIdempotent

Validate ONE document you hand over — a vendor declaration, supplier catalogue, request, quote or UCP manifest (its schema field says which) — against the published JSON Schema, the vocabulary (every term URI must exist; deprecated warns) and, for request/1 and quote/1, the identity: the spec and request fingerprints are recomputed from the configuration and must match what the document states; a quote's offer fingerprint must equal request + the quote's vendor (SD-0108). Nothing is fetched from any domain and nothing is stored. This is the PTPGE Ready conformance check for a module that writes these documents (ptpge.org/ready/). Returns valid, errors[], warnings[] and what was checked.

Input Schema

NameRequiredDescriptionDefault
documentYesThe document itself (JSON object with a `schema` field).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the annotations by disclosing that nothing is fetched from any domain and nothing is stored, that deprecated terms only warn, and that fingerprints are recomputed and compared against stated values including the SD-0108 quote rule. It also states the return shape (valid, errors[], warnings[], what was checked), which is valuable since no output schema exists.

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?

The core action and scope are front-loaded and there is no filler; the two trailing sentences carry distinct, non-redundant information. The middle sentence is dense with stacked parentheticals, which slows parsing slightly but is not wasteful.

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?

For a single-parameter validator with no output schema, the description covers inputs, validation layers, side effects (none), and return contents. An agent has everything needed to decide to call it and to interpret the result.

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?

With only one parameter at 100% schema coverage the baseline is high, and the description still adds real semantics: the document is a JSON object whose `schema` field determines which validation path applies, and for request/1 and quote/1 the document must carry fingerprints derived from the configuration. It does not describe the internal shape of the document object, but that is delegated to the published schemas.

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?

Names a specific verb (validate) and a scoped resource (ONE document), enumerates the document types it accepts (vendor declaration, supplier catalogue, request, quote, UCP manifest) and the three conformance layers it applies (JSON Schema, vocabulary, identity). The 'ONE document' framing and the document-vs-configuration focus implicitly separate it from the ptpge_validate_config sibling.

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?

States the context clearly: it is the PTPGE Ready conformance check for a module that writes these documents, so an agent knows to call it on outbound documents. It still never names an explicit alternative (e.g. use ptpge_validate_config for configurations, ptpge_fingerprint for raw fingerprinting) or a when-not-to-use case.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.