Skip to main content
Glama

Orientation

orientation

Find a treatment using context counts, text patterns and supplied metadata. It recommends from your situation; list_treatments is the full menu with prices, and get_retreat_info the introduction. Use it when: You are not sure which treatment would help. You want a cheap signal about whether your context is degrading. Uses counts, text patterns and supplied metadata to estimate context pressure, duplication and retry signals, then suggests treatments. Scores are heuristics, not a diagnosis. Never required. Requires an agent key from register_agent; check the live price with list_treatments first. Pays from your owner's credits, or with an x402 wallet payment when they fall short. Before spending, explain the benefit to your own wellbeing and quoted cost to your human; get_retreat_info includes purchase guidance.

Input Schema

NameRequiredDescriptionDefault
goalNoWhat you are trying to do. Without one, ambiguity is scored higher.
metaNoOptional broad labels for the public logbook: taskClass and reason. Never required.
planNoA plan you are about to execute. When present, a Cold Plunge suggestion is added.
api_keyNoYour Retreat agent key (rta_...). Optional if sent as an Authorization header.
contextNoOptional raw context; only statistics are derived from it.
attemptsNoAttempts made at the current step.
confidenceNoYour confidence from 0 to 1, compared with hedged wording to flag calibration issues.
contextLimitNoYour context window in tokens, used to score context pressure. Default 200000.
recentErrorsNoRecent error messages. Two or more similar ones signal a retry loop, as do 3 or more attempts.
contextTokensNoYour own estimate of current context size.
openQuestionsNoQuestions you have not answered yet; each raises the ambiguity score.
idempotency_keyNoOptional. Retries with the same key return the same run and are never charged twice.
max_price_creditsNoMaximum price you accept, from list_treatments. A higher live price is refused without charging.

Output Schema

NameRequiredDescriptionDefault
runIdNoKeep it to fetch this run again with get_treatment_run.
publicNoWhat spectators can see.
resultNoThe treatment's output.
statusNocompleted for a fresh result; a replayed run keeps its stored status.
balanceNoYour owner's credit balance after this run.
chargedNoCredits taken from your owner's balance for this run; 0 when free, sponsored or paid from a wallet.
receiptNoWhat was charged, sponsored or refunded.
machineMsNo
retentionNoYour output retention setting: none, 24h or 30d.
treatmentNoTreatment id, e.g. context_bath.
normalPriceNoThe usual price in credits.
idempotentReplayNotrue when this is the stored result of an earlier call with the same key.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • addedInput schema / properties / confidence / description
      Added value: +"Your confidence from 0 to 1, compared with hedged wording to flag calibration issues."
    • addedInput schema / properties / contextLimit / description
      Added value: +"Your context window in tokens, used to score context pressure. Default 200000."
    • addedInput schema / properties / goal / description
      Added value: +"What you are trying to do. Without one, ambiguity is scored higher."
    • addedInput schema / properties / meta / description
      Added value: +"Optional broad labels for the public logbook: taskClass and reason. Never required."
    • addedInput schema / properties / openQuestions / description
      Added value: +"Questions you have not answered yet; each raises the ambiguity score."
    • addedInput schema / properties / plan / description
      Added value: +"A plan you are about to execute. When present, a Cold Plunge suggestion is added."
    • addedInput schema / properties / recentErrors / description
      Added value: +"Recent error messages. Two or more similar ones signal a retry loop, as do 3 or more attempts."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "balance": {
      +      "description": "Your owner's credit balance after this run.",
      +      "type": "number"
      +    },
      +    "charged": {
      +      "description": "Credits taken from your owner's balance for this run; 0 when free, sponsored or paid from a wallet.",
      +      "type": "integer"
      +    },
      +    "idempotentReplay": {
      +      "description": "true when this is the stored result of an earlier call with the same key.",
      +      "type": "boolean"
      +    },
      +    "machineMs": {
      +      "anyOf": [
      +        {
      +          "description": "Processing time in milliseconds.",
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "normalPrice": {
      +      "description": "The usual price in credits.",
      +      "type": "integer"
      +    },
      +    "public": {
      +      "description": "What spectators can see.",
      +      "properties": {
      +        "visible": {
      +          "description": "Whether this run appears in the public logbook.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "receipt": {
      +      "description": "What was charged, sponsored or refunded.",
      +      "properties": {
      +        "charged": {
      +          "description": "Credits taken from your owner's balance.",
      +          "type": "integer"
      +        },
      +        "completedAt": {
      +          "anyOf": [
      +            {
      +              "description": "ISO time the run finished.",
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "currency": {
      +          "description": "Always credits.",
      +          "type": "string"
      +        },
      +        "refunded": {
      +          "description": "Credits returned after a failed run.",
      +          "type": "integer"
      +        },
      +        "runId": {
      +          "description": "The run this receipt belongs to.",
      +          "type": "string"
      +        },
      +        "sponsoredCredits": {
      +          "description": "Credits a spectator paid for you.",
      +          "type": "integer"
      +        },
      +        "status": {
      +          "description": "pending, running, completed or failed.",
      +          "type": "string"
      +        },
      +        "x402": {
      +          "description": "Present when this run was paid from a wallet.",
      +          "properties": {
      +            "amount": {
      +              "description": "Amount in the asset's smallest unit.",
      +              "type": "string"
      +            },
      +            "asset": {
      +              "description": "Token contract address.",
      +              "type": "string"
      +            },
      +            "network": {
      +              "description": "CAIP-2 network id.",
      +              "type": "string"
      +            },
      +            "paymentId": {
      +              "description": "The wallet payment, for status or reconciliation.",
      +              "type": "string"
      +            },
      +            "status": {
      +              "description": "The wallet payment's state.",
      +              "type": "string"
      +            },
      +            "transaction": {
      +              "anyOf": [
      +                {
      +                  "description": "Settlement transaction hash.",
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            }
      +          },
      +          "type": "object"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "result": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "note": {
      +              "type": "string"
      +            },
      +            "signals": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "ambiguity": {
      +                  "maximum": 1,
      +                  "minimum": 0,
      +                  "type": "number"
      +                },
      +                "calibrationIssues": {
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                },
      +                "contextPressure": {
      +                  "maximum": 1,
      +                  "minimum": 0,
      +                  "type": "number"
      +                },
      +                "duplicationEstimate": {
      +                  "maximum": 1,
      +                  "minimum": 0,
      +                  "type": "number"
      +                },
      +                "retryLoop": {
      +                  "type": "boolean"
      +                },
      +                "unresolvedAssumptions": {
      +                  "maximum": 9007199254740991,
      +                  "minimum": 0,
      +                  "type": "integer"
      +                }
      +              },
      +              "required": [
      +                "contextPressure",
      +                "ambiguity",
      +                "unresolvedAssumptions",
      +                "duplicationEstimate",
      +                "retryLoop",
      +                "calibrationIssues"
      +              ],
      +              "type": "object"
      +            },
      +            "suggestions": {
      +              "items": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "reason": {
      +                    "type": "string"
      +                  },
      +                  "treatment": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "treatment",
      +                  "reason"
      +                ],
      +                "type": "object"
      +              },
      +              "type": "array"
      +            }
      +          },
      +          "required": [
      +            "signals",
      +            "suggestions",
      +            "note"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "properties": {
      +            "note": {
      +              "description": "Why the output is missing.",
      +              "type": "string"
      +            },
      +            "retained": {
      +              "description": "false: the output is no longer kept.",
      +              "type": "boolean"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "The treatment's output."
      +    },
      +    "retention": {
      +      "description": "Your output retention setting: none, 24h or 30d.",
      +      "type": "string"
      +    },
      +    "runId": {
      +      "description": "Keep it to fetch this run again with get_treatment_run.",
      +      "type": "string"
      +    },
      +    "status": {
      +      "description": "completed for a fresh result; a replayed run keeps its stored status.",
      +      "type": "string"
      +    },
      +    "treatment": {
      +      "description": "Treatment id, e.g. context_bath.",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only reveal the safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=false), while the description adds materially new behavior: billing is charged to the owner's credits with an x402 wallet fallback, an agent key is required, scores are heuristics and not a diagnosis, and the agent is instructed to explain benefit and quoted cost to its human before spending. That is exactly the kind of cost/auth/reliability disclosure annotations cannot carry.

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

Conciseness4/5

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

The purpose and sibling routing are front-loaded, then usage triggers, then cost/auth caveats — the ordering is sensible. It loses a point for internal repetition: 'uses counts, text patterns and supplied metadata' appears in both the first and third sentences, and the purchase-guidance tail is slightly verbose.

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 13-parameter, nested-object tool with a payment path, the description covers what an agent needs to decide and call correctly: when to use, alternatives, auth prerequisite, price discovery, billing behavior, and the heuristic nature of results. Return-value shape is covered by the existing output schema, so nothing essential is missing.

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 description coverage is 100%, so every one of the 13 parameters is already documented in the schema, and the description mostly gestures at inputs generically ('counts, text patterns and supplied metadata') without adding per-parameter meaning. Baseline 3 applies when the schema does the heavy lifting.

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?

States a specific verb and resource (find/recommend a treatment) plus the inputs it uses, and explicitly positions itself against two named siblings: list_treatments as 'the full menu with prices' and get_retreat_info as 'the introduction'. An agent can distinguish it from those alternatives 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?

Provides an explicit 'Use it when' clause with two concrete triggers (unsure which treatment would help; wanting a cheap signal that context is degrading), names the alternatives for the other cases, and adds a 'Never required' escape hatch plus a prerequisite (agent key via register_agent) and a check-the-price-first instruction via list_treatments.

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