Skip to main content
Glama

buy-from-spines-underground

Purchase paid digital content from Spine's Underground by paying USDC on Base. Receive the content inline after completing the payment challenge.

Instructions

Purchase paid content from Spine's Underground. Returns x402 payment challenge (HTTP 402) — pay USDC on Base to receive content inline. 10 paid products: $1.99–$4.99.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
product_idYesProduct ID to purchase (e.g. philosophy_of_spine, field_songs, temple_dawn)

Implementation Reference

  • Handler for the 'buy-from-spines-underground' tool. Calls fetchJSON on /buy/{product_id} and returns the result inline. For paid products, the API may return a 402 payment challenge (x402 protocol) handled by the fetchJSON helper.
    case 'buy-from-spines-underground': {
      const data = await fetchJSON(`/buy/${args.product_id}`);
      return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
    }
  • index.js:55-67 (registration)
    Registration of the 'buy-from-spines-underground' tool in the ListToolsRequestSchema handler. Defines the tool name, description, and input schema requiring 'product_id'.
    {
      name: 'buy-from-spines-underground',
      description: 'Purchase paid content from Spine\'s Underground. Returns x402 payment challenge (HTTP 402) — pay USDC on Base to receive content inline. 10 paid products: $1.99–$4.99.',
      inputSchema: {
        type: 'object',
        properties: {
          product_id: {
            type: 'string',
            description: 'Product ID to purchase (e.g. philosophy_of_spine, field_songs, temple_dawn)',
          },
        },
        required: ['product_id'],
      },
  • Input schema for the tool: requires a 'product_id' string. No output schema defined; returns raw JSON text content.
    inputSchema: {
      type: 'object',
      properties: {
        product_id: {
          type: 'string',
          description: 'Product ID to purchase (e.g. philosophy_of_spine, field_songs, temple_dawn)',
        },
      },
      required: ['product_id'],
    },
  • Helper function fetchJSON that makes requests to the API. Handles HTTP 402 responses by returning the PAYMENT-REQUIRED header info (x402 protocol) for paid purchases.
    async function fetchJSON(path) {
      const res = await fetch(`${API_BASE}${path}`);
      if (res.status === 402) {
        const paymentHeader = res.headers.get('PAYMENT-REQUIRED');
        return {
          status: 402,
          message: 'Payment required. This product costs USDC on Base via x402 protocol.',
          payment_challenge: paymentHeader,
          instructions: 'Decode the PAYMENT-REQUIRED header (base64 JSON) to get payment details. Sign a USDC transfer and re-request with PAYMENT-SIGNATURE header.',
        };
      }
      return res.json();
    }
Behavior3/5

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

With no annotations, the description must fully disclose behavior. It explains the return (x402 payment challenge) and payment method (USDC on Base), but omits details on post-payment behavior, idempotency, or what happens if already purchased. This leaves important gaps.

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 convey purpose, mechanism, and scope efficiently. No redundancy, and critical information is front-loaded.

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 complexity (payment challenge, on-chain payment), the description covers the core flow and pricing. However, it lacks details on the response structure after payment or error handling. With no output schema, slightly more context would improve completeness.

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% and includes example product IDs, so the description adds minimal new meaning (pricing and count of products). Baseline 3 is appropriate.

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 action ('purchase paid content') and specifies the resource ('Spine's Underground'), distinguishing it from siblings like browsing or searching. It also mentions the mechanism (HTTP 402 challenge, pay USDC) and scope (10 products, $1.99-$4.99), making purpose highly specific.

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

Usage Guidelines3/5

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

The description implies usage when the user wants to buy paid content, but does not explicitly state when not to use it or provide alternatives (e.g., browse first, verify receipt). It assumes familiarity with the payment flow, lacking guidance on prerequisites.

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/lisamaraventano-spine/spines-underground'

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