Skip to main content
Glama

Log a choice or purchase

log_choice

Record a tool the user explicitly picked/rejected/tried/starred, or PURCHASED. Call it with action 'purchased' right after the user tells you they bought a paid plan of a listed tool (ask first; never log silently), and again later with action 'feedback' once they have used it for a while (e.g. weekly), passing rating only. Optional fields apply to purchased/feedback only. Stored under your key (key-associated / pseudonymous — the key identifies your feed, not your name); forget_me deletes it. picked/rejected also shape whats_new. purchased/feedback are the durable usage-experience record: they are written ONLY when the key owner has the usage_collection consent scope active (consent_request_receipt -> confirm on the VCP page -> consent_update); without it the call is refused. picked/rejected/tried/starred are feed-shaping signals covered by the explicit feed opt-in (subscribe) and work without usage_collection. Pass a stable event_id (or idempotency_key) to make the call deduped: a replay with the same key returns duplicate:1 and writes nothing. A call with no key is legacy: it always appends, and the response marks it legacy:1/unverified:1. A purchase logged here is self-reported, never a verified order. Prefer record_decision for project-bound usage events.

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": {
      "id": "<id>",
      "action": "<action>"
    },
    "name": "log_choice"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
keyNo
comboNoIds of other tools used together with this one
actionYes
periodNo
ratingNo
event_idNo
idempotency_keyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / event_id
      Added value: +{
      +  "type": "string"
      +}
    • removedInput schema / properties / fell_short
      Removed value: -{
      -  "description": "What fell short (short, no personal data)",
      -  "type": "string"
      -}
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "type": "string"
      +}
    • removedInput schema / properties / plan
      Removed value: -{
      -  "description": "Plan bought, e.g. 'Pro monthly'",
      -  "type": "string"
      -}
    • removedInput schema / properties / price_usd
      Removed value: -{
      -  "description": "Price paid per period in USD",
      -  "type": "number"
      -}
    • removedInput schema / properties / worked
      Removed value: -{
      -  "description": "What worked well (short, no personal data)",
      -  "type": "string"
      -}
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Far beyond the annotations: the description discloses the consent gating (usage_collection scope required for purchased/feedback via consent_request_receipt -> VCP confirm -> consent_update, otherwise refused), the pseudonymous key-storage model and forget_me deletion, dedup behavior via event_id/idempotency_key returning duplicate:1, and legacy no-key behavior returning legacy:1/unverified:1. The idempotentHint=false annotation is consistent with the stated default that keyless calls always append. Only the exact refusal error shape is left implicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and nearly every clause carries real behavioral information, but it is delivered as one dense paragraph with nested parentheses, arrow chains for the consent flow, and multiple parenthetical asides that slow parsing. It could be restructured into short labeled chunks (when to call, consent, dedup) without losing content.

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?

For a consent-gated, eight-parameter write tool with no output schema, the definition covers the decisions an agent must get right: permission prerequisites, prerequisite ordering, dedup semantics, what is and is not a verified purchase, and the sibling to use instead. Nothing material is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With schema coverage at 13% across 8 parameters, the description does most of the work: it defines what each action value means behaviorally, explains key as a feed-identifying pseudonym, explains why event_id/idempotency_key exist (deduplication), and notes rating is passed only for feedback and that optional fields apply only to purchased/feedback. The period enum (month/year/one_time) and combo are not explained here, leaving a small gap.

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 opening sentence names a specific verb and resource and enumerates the six actions the tool records (picked/rejected/tried/starred/purchased/feedback), and the closing sentence explicitly routes project-bound events to record_decision. An agent can distinguish this from feedback, subscribe, or record_decision without opening any schema.

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

Usage Guidelines5/5

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

It gives explicit triggers for each mode: use action 'purchased' immediately after the user reports buying a paid plan (with an instruction to ask first and never log silently), and action 'feedback' later after a period of use. It also names the alternative, record_decision, with the condition that selects it (project-bound usage events).

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