Skip to main content
Glama

get_chain

Fetch all receipts in a specific workflow chain to audit agent operations, calculate total costs, or identify failed steps. Returns complete timestamped receipt sequences with cryptographic signatures.

Instructions

Retrieve all receipts belonging to a chain, ordered by timestamp ascending to show the sequence of operations. A chain groups related receipts from a multi-step agent workflow. Returns the complete receipt objects for every step. Use to audit a complete workflow, calculate total chain cost and duration, or identify which step in a pipeline failed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chain_idYesThe chain ID to retrieve (format: "chain_" followed by 8 alphanumeric characters)
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses critical behavioral traits: ordering ('timestamp ascending'), return structure ('complete receipt objects for every step'), and grouping semantics. Missing explicit read-only declaration and error handling (e.g., invalid chain_id), but 'Retrieve' implies safe read operation.

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?

Four sentences with zero waste: (1) core action + ordering, (2) domain definition, (3) return format, (4) use cases. Front-loaded with the essential operation and ordering constraint. Every sentence earns its place.

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?

Strong coverage for a tool with no output schema. Explains return values ('complete receipt objects'), domain concept (chain as workflow grouping), and practical applications. Would need error handling or pagination notes for a 5, but adequate for the complexity level.

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 coverage is 100% with detailed format specification for chain_id. Description adds conceptual context that a chain represents a 'multi-step agent workflow,' which helps agents understand what the ID refers to, but does not add syntax or constraint details beyond the schema.

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?

Description uses specific verb 'Retrieve' with clear resource 'receipts belonging to a chain' and distinguishes from siblings (get_receipt for single receipts, list_receipts for ungrouped lists) by defining a chain as 'related receipts from a multi-step agent workflow' with explicit ordering 'timestamp ascending'.

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?

Provides explicit positive use cases: 'audit a complete workflow, calculate total chain cost and duration, or identify which step in a pipeline failed.' Lacks explicit 'when not to use' guidance or named alternatives, but the use cases clearly signal this is for sequential workflow analysis rather than single-receipt lookup.

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/webaesbyamin/agent-receipts'

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