Skip to main content
Glama

Purchase package

purchase_package

Sell a class package to a participant: creates a pass with credits_remaining = the package's credits and an expiry from validity_days.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "participant_id": "<participant_id>",
      "class_package_id": "<class_package_id>"
    },
    "name": "purchase_package"
  }
}

Input Schema

NameRequiredDescriptionDefault
participant_idYes
class_package_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish that this is a non-read-only, non-idempotent, non-destructive, closed-world mutation; the description earns credit by disclosing the actual side effect and the derived field values (credits_remaining and expiry from validity_days), which the annotations cannot convey. It stops short of saying that repeated calls create duplicate passes, which matters given idempotentHint=false.

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?

A single front-loaded sentence that carries the core action first and the derived-field detail second; no redundant restatement of the title or the parameter names.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter mutation with no output schema, the description covers the creation effect well but omits the return value (e.g. the new pass ID) and anything about payment or billing implications of 'sell', which is a meaningful gap for a purchase 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 coverage is 0%, so the schema itself adds no meaning to the two string IDs. The description partially compensates by explaining that class_package_id is the source of credits and validity_days and participant_id is the recipient, but it leaves open whether the participant must already exist or have an active membership.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource ('Sell a class package to a participant') and states the concrete effect: a pass is created with credits_remaining copied from the package and an expiry derived from validity_days. That distinguishes it in substance from create_class_package (defines a package) and redeem_package (consumes credits), though it never names those siblings explicitly.

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?

Usage is only implied: the wording makes clear this is the enrollment/sale path rather than the package-definition or redemption path, but there is no explicit 'use this when...' statement, no prerequisite that the participant and package already exist, and no named alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources