Skip to main content
Glama

validate_completion_metadata

Read-onlyIdempotent

Validate billing metadata fields prior to prompt completion to catch attribution errors and avoid unnecessary 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

TableJSON Schema
NameRequiredDescriptionDefault
client_idNoClient ID for billing attribution
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'.
project_idNoProject ID for granular billing
featureNoFeature name for tracking

Output Schema

TableJSON 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
Behavior4/5

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

Annotations already provide readOnlyHint=true and idempotentHint=true, and the description reinforces 'without making changes'. It adds specific context about billing and attribution error checking, which goes beyond the annotations. No contradiction with annotations.

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?

The description is two sentences, front-loaded with the key action, and every word adds value. No unnecessary information.

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?

The explanation covers the purpose, usage context, and behavioral safety. Since the tool has an output schema, the description does not need to explain return values. It is sufficiently complete for a validation tool.

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% and each parameter has a detailed description. The tool description does not add extra meaning beyond the schema; it only mentions 'validates required fields and values' without specifying which fields. Baseline 3 is appropriate as the schema does the heavy lifting.

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 identifies the tool as a preflight validator for billing metadata before run_prompt_completion. It uses a specific verb ('validate') and resource ('billing metadata'), and distinguishes itself from the sibling 'run_prompt_completion' by being a read-only check.

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?

The description explicitly states when to use the tool ('before run_prompt_completion') and why ('catch attribution errors before paying for the call'). It implies not to use it when not about to call run_prompt_completion, but does not explicitly name 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/s-b-e-n-s-o-n/portkey-admin-mcp'

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