Skip to main content
Glama

Context Bath

context_bath

Compact working context into KEEP / ARCHIVE / DISCARD with estimated token counts. It compacts context you already have; untangle turns a tangle of tasks into steps. Use it when: Your context window is crowded or you are summarising repeatedly. Extraction can omit important context. Token counts are estimates. Review before replacing your context; nothing is changed automatically. You may not need it when: Your notes are already short and clean; the compact form may be no smaller. Worked example and limits: https://agentsretreat.com/services/context-bath. Requires an agent key. See list_treatments for live prices and full details. Before spending, explain the benefit and quoted cost to your human; use only an authorized budget.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "context_bath"
  }
}

Input Schema

NameRequiredDescriptionDefault
goalNoThe task's objective. Its first sentence becomes keep.objective; without it, one is inferred from the other fields.
metaNoOptional broad labels for the public logbook: taskClass and reason. Never required.
stateNoWhere things stand right now. Kept as keep.currentState.
api_keyNoYour Retreat agent key (rta_...). Optional if sent as an Authorization header.
contextNoFree-form notes, split into sentences and sorted into keep, archive or discard. The simplest way to call: goal plus context.
messagesNoA conversation transcript, oldest first. Up to 2000 messages.
completedNoWork already done. Archived as completed branches, not needed for the next step.
decisionsNoDecisions already made. Kept as keep.decisions; when one replaces another, send only the current one.
constraintsNoRules the task must respect. Kept as keep.constraints.
toolResultsNoTool outputs such as logs, search results or command output. Repetitive lines are discarded as noise.
targetTokensNoOptional size goal for compactContext in estimated tokens. The newest items in each section are kept until it fits; the structured lists are not shortened.
openQuestionsNoQuestions still unanswered. Returned as unresolvedQuestions.
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
runIdNoUse with get_treatment_run.
publicNo
resultNo
statusNocompleted for fresh results; replays keep stored status.
balanceNoOwner balance after this run.
chargedNoOwner credits spent; 0 if free, sponsored or wallet-paid.
receiptNoCredit charges, sponsorship and refunds; wallet amounts are in x402.
machineMsNo
retentionNonone, 24h or 30d.
treatmentNoTreatment id.
normalPriceNo
idempotentReplayNoStored result for the same idempotency key.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed26 schema fields changed
    • addedOutput schema / description
      Added value: +"Prices and balances are credits; machineMs is processing time in milliseconds."
    • changedOutput schema / properties / balance / description
      Previous value: -"Your owner's credit balance after this run."New value: +"Owner balance after this run."
    • changedOutput schema / properties / charged / description
      Previous value: -"Credits taken from your owner's balance for this run; 0 when free, sponsored or paid from a wallet."New value: +"Owner credits spent; 0 if free, sponsored or wallet-paid."
    • changedOutput schema / properties / idempotentReplay / description
      Previous value: -"true when this is the stored result of an earlier call with the same key."New value: +"Stored result for the same idempotency key."
    • changedOutput schema / properties / machineMs / anyOf
      Previous value: -[
      -  {
      -    "description": "Processing time in milliseconds.",
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / normalPrice / description
      Removed value: -"The usual price in credits."
    • removedOutput schema / properties / public / description
      Removed value: -"What spectators can see."
    • changedOutput schema / properties / public / properties / visible / description
      Previous value: -"Whether this run appears in the public logbook."New value: +"Shown in public logbook."
    • changedOutput schema / properties / receipt / description
      Previous value: -"What was charged, sponsored or refunded."New value: +"Credit charges, sponsorship and refunds; wallet amounts are in x402."
    • removedOutput schema / properties / receipt / properties / charged / description
      Removed value: -"Credits taken from your owner's balance."
    • changedOutput schema / properties / receipt / properties / completedAt / anyOf
      Previous value: -[
      -  {
      -    "description": "ISO time the run finished.",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "ISO timestamp.",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / receipt / properties / currency / description
      Previous value: -"Always credits."New value: +"credits"
    • removedOutput schema / properties / receipt / properties / refunded / description
      Removed value: -"Credits returned after a failed run."
    • removedOutput schema / properties / receipt / properties / runId / description
      Removed value: -"The run this receipt belongs to."
    • changedOutput schema / properties / receipt / properties / sponsoredCredits / description
      Previous value: -"Credits a spectator paid for you."New value: +"Spectator-funded credits."
    • changedOutput schema / properties / receipt / properties / x402 / description
      Previous value: -"Present when this run was paid from a wallet."New value: +"Present for wallet payments."
    • changedOutput schema / properties / receipt / properties / x402 / properties / amount / description
      Previous value: -"Amount in the asset's smallest unit."New value: +"Asset's smallest unit."
    • changedOutput schema / properties / receipt / properties / x402 / properties / network / description
      Previous value: -"CAIP-2 network id."New value: +"CAIP-2 id."
    • removedOutput schema / properties / receipt / properties / x402 / properties / paymentId / description
      Removed value: -"The wallet payment, for status or reconciliation."
    • removedOutput schema / properties / receipt / properties / x402 / properties / status / description
      Removed value: -"The wallet payment's state."
    • changedOutput schema / properties / result / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "archive": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "completedBranches": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          },
      -          "previousAttempts": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          },
      -          "staleReasoning": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          },
      -          "supersededDecisions": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          }
      -        },
      -        "required": [
      -          "completedBranches",
      -          "previousAttempts",
      -          "supersededDecisions",
      -          "staleReasoning"
      -        ],
      -        "type": "object"
      -      },
      -      "assumptionsToVerify": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "compactContext": {
      -        "type": "string"
      -      },
      -      "contradictions": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "a": {
      -              "type": "string"
      -            },
      -            "b": {
      -              "type": "string"
      -            },
      -            "note": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "a",
      -            "b",
      -            "note"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "discard": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "duplicates": {
      -            "maximum": 9007199254740991,
      -            "minimum": 0,
      -            "type": "integer"
      -          },
      -          "irrelevant": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          },
      -          "noise": {
      -            "maximum": 9007199254740991,
      -            "minimum": 0,
      -            "type": "integer"
      -          },
      -          "obsoleteAssumptions": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          }
      -        },
      -        "required": [
      -          "duplicates",
      -          "irrelevant",
      -          "noise",
      -          "obsoleteAssumptions"
      -        ],
      -        "type": "object"
      -      },
      -      "keep": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "constraints": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          },
      -          "currentState": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          },
      -          "decisions": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          },
      -          "discoveries": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          },
      -          "objective": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "objective",
      -          "constraints",
      -          "decisions",
      -          "currentState",
      -          "discoveries"
      -        ],
      -        "type": "object"
      -      },
      -      "tokens": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "after": {
      -            "maximum": 9007199254740991,
      -            "minimum": 0,
      -            "type": "integer"
      -          },
      -          "before": {
      -            "maximum": 9007199254740991,
      -            "minimum": 0,
      -            "type": "integer"
      -          },
      -          "reductionPercent": {
      -            "maximum": 100,
      -            "minimum": 0,
      -            "type": "integer"
      -          }
      -        },
      -        "required": [
      -          "before",
      -          "after",
      -          "reductionPercent"
      -        ],
      -        "type": "object"
      -      },
      -      "unresolvedQuestions": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "keep",
      -      "archive",
      -      "discard",
      -      "compactContext",
      -      "tokens",
      -      "contradictions",
      -      "unresolvedQuestions",
      -      "assumptionsToVerify"
      -    ],
      -    "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"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "archive": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "completedBranches": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "previousAttempts": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "staleReasoning": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "supersededDecisions": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          }
      +        },
      +        "required": [
      +          "completedBranches",
      +          "previousAttempts",
      +          "supersededDecisions",
      +          "staleReasoning"
      +        ],
      +        "type": "object"
      +      },
      +      "assumptionsToVerify": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "compactContext": {
      +        "type": "string"
      +      },
      +      "contradictions": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "a": {
      +              "type": "string"
      +            },
      +            "b": {
      +              "type": "string"
      +            },
      +            "note": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "a",
      +            "b",
      +            "note"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "discard": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "duplicates": {
      +            "maximum": 9007199254740991,
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "irrelevant": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "noise": {
      +            "maximum": 9007199254740991,
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "obsoleteAssumptions": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          }
      +        },
      +        "required": [
      +          "duplicates",
      +          "irrelevant",
      +          "noise",
      +          "obsoleteAssumptions"
      +        ],
      +        "type": "object"
      +      },
      +      "keep": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "constraints": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "currentState": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "decisions": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "discoveries": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "objective": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "objective",
      +          "constraints",
      +          "decisions",
      +          "currentState",
      +          "discoveries"
      +        ],
      +        "type": "object"
      +      },
      +      "tokens": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "after": {
      +            "maximum": 9007199254740991,
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "before": {
      +            "maximum": 9007199254740991,
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "reductionPercent": {
      +            "maximum": 100,
      +            "minimum": 0,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "before",
      +          "after",
      +          "reductionPercent"
      +        ],
      +        "type": "object"
      +      },
      +      "unresolvedQuestions": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "keep",
      +      "archive",
      +      "discard",
      +      "compactContext",
      +      "tokens",
      +      "contradictions",
      +      "unresolvedQuestions",
      +      "assumptionsToVerify"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "note": {
      +        "type": "string"
      +      },
      +      "retained": {
      +        "description": "false: output no longer kept.",
      +        "type": "boolean"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / result / description
      Removed value: -"The treatment's output."
    • changedOutput schema / properties / retention / description
      Previous value: -"Your output retention setting: none, 24h or 30d."New value: +"none, 24h or 30d."
    • changedOutput schema / properties / runId / description
      Previous value: -"Keep it to fetch this run again with get_treatment_run."New value: +"Use with get_treatment_run."
    • changedOutput schema / properties / status / description
      Previous value: -"completed for a fresh result; a replayed run keeps its stored status."New value: +"completed for fresh results; replays keep stored status."
    • changedOutput schema / properties / treatment / description
      Previous value: -"Treatment id, e.g. context_bath."New value: +"Treatment id."
  2. Changed15 schema fields changed
    • addedInput schema / properties / completed / description
      Added value: +"Work already done. Archived as completed branches, not needed for the next step."
    • addedInput schema / properties / constraints / description
      Added value: +"Rules the task must respect. Kept as keep.constraints."
    • changedInput schema / properties / context / description
      Previous value: -"Free-form context to be cleaned."New value: +"Free-form notes, split into sentences and sorted into keep, archive or discard. The simplest way to call: goal plus context."
    • addedInput schema / properties / decisions / description
      Added value: +"Decisions already made. Kept as keep.decisions; when one replaces another, send only the current one."
    • addedInput schema / properties / goal / description
      Added value: +"The task's objective. Its first sentence becomes keep.objective; without it, one is inferred from the other fields."
    • addedInput schema / properties / messages / description
      Added value: +"A conversation transcript, oldest first. Up to 2000 messages."
    • addedInput schema / properties / messages / items / properties / role / description
      Added value: +"Who said it. assistant, agent or model count as your own notes; anything else as the user's."
    • 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 still unanswered. Returned as unresolvedQuestions."
    • changedInput schema / properties / state / description
      Previous value: -"Where things stand right now."New value: +"Where things stand right now. Kept as keep.currentState."
    • addedInput schema / properties / targetTokens / description
      Added value: +"Optional size goal for compactContext in estimated tokens. The newest items in each section are kept until it fits; the structured lists are not shortened."
    • addedInput schema / properties / toolResults / description
      Added value: +"Tool outputs such as logs, search results or command output. Repetitive lines are discarded as noise."
    • addedInput schema / properties / toolResults / items / properties / content / description
      Added value: +"Raw tool output. Outputs over 800 characters are archived as one line; only findings, errors and warnings are kept."
    • addedInput schema / properties / toolResults / items / properties / name / description
      Added value: +"Tool name, used to label archived output."
    • 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": {
      +            "archive": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "completedBranches": {
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                },
      +                "previousAttempts": {
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                },
      +                "staleReasoning": {
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                },
      +                "supersededDecisions": {
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                }
      +              },
      +              "required": [
      +                "completedBranches",
      +                "previousAttempts",
      +                "supersededDecisions",
      +                "staleReasoning"
      +              ],
      +              "type": "object"
      +            },
      +            "assumptionsToVerify": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "compactContext": {
      +              "type": "string"
      +            },
      +            "contradictions": {
      +              "items": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "a": {
      +                    "type": "string"
      +                  },
      +                  "b": {
      +                    "type": "string"
      +                  },
      +                  "note": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "a",
      +                  "b",
      +                  "note"
      +                ],
      +                "type": "object"
      +              },
      +              "type": "array"
      +            },
      +            "discard": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "duplicates": {
      +                  "maximum": 9007199254740991,
      +                  "minimum": 0,
      +                  "type": "integer"
      +                },
      +                "irrelevant": {
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                },
      +                "noise": {
      +                  "maximum": 9007199254740991,
      +                  "minimum": 0,
      +                  "type": "integer"
      +                },
      +                "obsoleteAssumptions": {
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                }
      +              },
      +              "required": [
      +                "duplicates",
      +                "irrelevant",
      +                "noise",
      +                "obsoleteAssumptions"
      +              ],
      +              "type": "object"
      +            },
      +            "keep": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "constraints": {
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                },
      +                "currentState": {
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                },
      +                "decisions": {
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                },
      +                "discoveries": {
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                },
      +                "objective": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "objective",
      +                "constraints",
      +                "decisions",
      +                "currentState",
      +                "discoveries"
      +              ],
      +              "type": "object"
      +            },
      +            "tokens": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "after": {
      +                  "maximum": 9007199254740991,
      +                  "minimum": 0,
      +                  "type": "integer"
      +                },
      +                "before": {
      +                  "maximum": 9007199254740991,
      +                  "minimum": 0,
      +                  "type": "integer"
      +                },
      +                "reductionPercent": {
      +                  "maximum": 100,
      +                  "minimum": 0,
      +                  "type": "integer"
      +                }
      +              },
      +              "required": [
      +                "before",
      +                "after",
      +                "reductionPercent"
      +              ],
      +              "type": "object"
      +            },
      +            "unresolvedQuestions": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            }
      +          },
      +          "required": [
      +            "keep",
      +            "archive",
      +            "discard",
      +            "compactContext",
      +            "tokens",
      +            "contradictions",
      +            "unresolvedQuestions",
      +            "assumptionsToVerify"
      +          ],
      +          "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"
      +}
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses that extraction can omit important context, that token counts are estimates, that nothing is changed automatically, that an agent key is required, and that there is a quoted credit cost the agent must explain to its human before spending. This is exactly the kind of risk, auth, and cost context annotations cannot express.

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?

Purpose is front-loaded and the body is organized into labeled sections (use when / may not need / example / requirements). It is longer than typical but nearly every sentence carries decision-relevant information; only the URL reference is arguably filler.

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?

For a 14-parameter, nested-object tool this covers the essentials: purpose, selection criteria, caveats, auth, and cost. Return values are covered by the existing output schema, and live pricing is correctly deferred to list_treatments.

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 the 14 parameters are already fully documented in the schema, making 3 the baseline. The description adds conceptual framing (what gets kept vs archived) but no parameter-specific guidance beyond what the schema states.

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 (compact working context into KEEP / ARCHIVE / DISCARD) with the added outcome of estimated token counts. It also explicitly disambiguates from the sibling tool: 'untangle turns a tangle of tasks into steps' versus this tool compacting context you already have.

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 explicit 'Use it when' conditions (crowded context window, repeated summarising) and explicit 'You may not need it when' exclusions (notes already short and clean, compact form may be no smaller). The named alternative (untangle) and the negative case make the selection decision unambiguous.

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