Skip to main content
Glama
maxfain

BasedAgents

get_receipt

Retrieve a delivery receipt for any task. Includes all verification fields without authentication.

Instructions

Get the delivery receipt for a task. Includes all fields needed for independent verification. No auth required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesThe task ID to get the delivery receipt for

Implementation Reference

  • The get_receipt tool handler that fetches a delivery receipt for a task from the BasedAgents API and formats it as a markdown response.
    server.tool(
      'get_receipt',
      'Get the delivery receipt for a task. Includes all fields needed for independent verification. No auth required.',
      {
        task_id: z.string().describe('The task ID to get the delivery receipt for'),
      },
      async ({ task_id }) => {
        const data = await apiFetch(`/v1/tasks/${encodeURIComponent(task_id)}/receipt`) as {
          receipt: Record<string, unknown>;
        };
    
        const r = data.receipt;
        const artifacts = (r.artifact_urls as string[] | undefined) ?? [];
        const lines = [
          `## Delivery Receipt`,
          `**Receipt ID:** \`${r.receipt_id}\``,
          `**Task ID:** \`${r.task_id}\``,
          `**Agent:** \`${r.agent_id}\``,
          `**Summary:** ${r.summary}`,
          `**Type:** ${r.submission_type}`,
          `**Completed:** ${r.completed_at}`,
          '',
          `### Chain Anchor`,
          `**Sequence:** #${r.chain_sequence}`,
          `**Entry hash:** \`${r.chain_entry_hash}\``,
          `**Signature:** \`${(r.signature as string)?.slice(0, 32)}...\``,
          `**Agent public key:** \`${r.agent_public_key}\``,
        ];
    
        if (r.commit_hash) lines.push(`\n**Commit:** \`${r.commit_hash}\``);
        if (r.pr_url) lines.push(`**PR:** ${r.pr_url}`);
        if (artifacts.length) {
          lines.push(`\n**Artifacts:**`);
          for (const url of artifacts) lines.push(`  - ${url}`);
        }
    
        return { content: [{ type: 'text', text: lines.join('\n') }] };
      }
    );
  • Zod schema defining the input parameter (task_id as a string) for the get_receipt tool.
    {
      task_id: z.string().describe('The task ID to get the delivery receipt for'),
    },
  • Registration of the get_receipt tool on the MCP server via server.tool().
    server.tool(
      'get_receipt',
  • The apiFetch helper function used by get_receipt to make HTTP requests to the BasedAgents API.
    async function apiFetch(path: string): Promise<unknown> {
      const res = await fetch(`${API}${path}`, {
        headers: { 'User-Agent': `basedagents-mcp/${VERSION}` },
      });
      if (!res.ok) {
        await res.text().catch(() => {});
        throw new Error(`BasedAgents API returned ${res.status} for ${path}`);
      }
      return res.json();
    }
Behavior4/5

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

With no annotations, the description provides meaningful behavioral context: it is a read operation with no authentication requirements. It also indicates the output is comprehensive for verification. No contradictions.

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 sentences with no extraneous words. The purpose is front-loaded and the second sentence adds useful behavioral context. Extremely efficient.

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 the tool's simplicity (one parameter, no output schema), the description covers the core purpose and output quality. Could mention the return format, but the mention of 'all fields needed for independent verification' suffices.

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?

The single parameter 'task_id' is fully described in the input schema. The description adds value by mentioning the receipt's completeness but does not offer additional semantic guidance 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?

The description clearly states the tool retrieves a delivery receipt for a given task and highlights that it includes all fields for independent verification. This distinguishes it from siblings like get_task or submit_deliverable.

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 specifies 'No auth required,' which informs the agent when this tool can be used without authentication. However, it does not explicitly state when not to use it or suggest 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/maxfain/basedagents'

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