Skip to main content
Glama

validate_completion_metadata

Read-onlyIdempotent

Validate required billing metadata fields before running a prompt completion to catch attribution errors before incurring costs.

Instructions

Preflight billing metadata before run_prompt_completion. Validates required fields and values without making changes, so you can catch attribution errors before paying for the call.

Input Schema

NameRequiredDescriptionDefault
appNoApp identifier (REQUIRED). Use your deployed app name, for example 'hourlink' or 'support-console'.
envNoEnvironment identifier (REQUIRED). Use your environment name, for example 'dev', 'staging', 'prod', or 'qa'.
featureNoFeature name for tracking
client_idNoClient ID for billing attribution
project_idNoProject ID for granular billing

Output Schema

NameRequiredDescriptionDefault
okYesWhether the tool call succeeded and returned structured data
dataNoStructured success payload when ok is true
errorNoStructured error payload when ok is false

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.9
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Addedv1.0.1
  3. Removed
  4. First observed

TDQS

A4.4/5.0
Behavior3/5

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

The non-mutating claim ('without making changes') largely restates the existing readOnlyHint/destructiveHint=false annotations, so it earns limited extra credit. The description does add useful context about the cost of skipping validation, but it says nothing about failure behavior — whether it returns all errors at once, throws, or returns a partial report. With annotations covering the safety profile and an output schema present, a 3 is appropriate.

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?

Two short sentences, both front-loaded with the action and its timing. No filler, no restated name, and the 'why' arrives after the 'what'.

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?

Given an output schema, rich annotations and full parameter documentation, the description covers what the tool does and when to reach for it. The only meaningful omission is what a validation failure looks like and whether optional attribution fields are checked at all.

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 100%, so baseline would be 3, but the description adds a real semantic hint: the tool checks *required* fields, which is notable because the schema declares no required array (requiredness lives only inside individual parameter descriptions for app and env). It still doesn't name which parameters are mandatory or how optional ones like client_id/project_id are treated.

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 specific verb (validates) and resource (billing metadata), plus a named scope ('preflight ... before run_prompt_completion') that distinguishes it from the actual completion-calling sibling. An agent can tell exactly what it does and where it sits in a sequence.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly prescribes the ordering: call this before run_prompt_completion. It also gives the motivation ('catch attribution errors before paying for the call'), which tells the agent the cost consequence of skipping it. Rival tools that consume metadata are implicitly excluded.

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