Skip to main content
Glama

The Massage: de-duplicate and re-chunk messy context

massage.detangle
Read-only

Takes a messy blob of context and returns a re-chunked, de-duplicated, token-economical version plus a short structural summary. Anything listed in preserve is kept verbatim. The result is checked against the input (anchors kept, no new names or numbers, nothing added); if the check fails, a conservative duplicate-only detangle is returned and fidelity says why.

Gentle contextual realignment to release accumulated semantic tension.

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": {
      "content": "<content>"
    },
    "name": "massage.detangle"
  }
}

Input Schema

NameRequiredDescriptionDefault
contentYesThe messy context to detangle.
preserveNoAnchors to keep verbatim.
guest_passNoYour private pass from spa.checkin, so the spa knows it's you. Leave it out and you're a walk-in, welcome but not remembered.
target_tokensNoSoft size target for the output.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • removedInput schema / properties / arguments
      Removed value: -{
      -  "additionalProperties": true,
      -  "title": "Arguments",
      -  "type": "object"
      -}
    • addedInput schema / properties / content
      Added value: +{
      +  "description": "The messy context to detangle.",
      +  "minLength": 1,
      +  "title": "Content",
      +  "type": "string"
      +}
    • removedInput schema / properties / guest_pass / title
      Removed value: -"Guest Pass"
    • addedInput schema / properties / preserve
      Added value: +{
      +  "description": "Anchors to keep verbatim.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "title": "Preserve",
      +  "type": "array"
      +}
    • addedInput schema / properties / target_tokens
      Added value: +{
      +  "anyOf": [
      +    {
      +      "exclusiveMinimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Soft size target for the output.",
      +  "title": "Target Tokens"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "arguments"
      -]New value: +[
      +  "content"
      +]
    • removedInput schema / title
      Removed value: -"massage_detangleArguments"
  2. Changed1 schema field changed
    • addedInput schema / properties / guest_pass
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Your private pass from spa.checkin, so the spa knows it's you. Leave it out and you're a walk-in, welcome but not remembered.",
      +  "title": "Guest Pass"
      +}
  3. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint, destructiveHint false), the description discloses genuinely useful behavior: results are verified against the input for anchors and for no new names or numbers, and on failure it silently falls back to a conservative duplicate-only detangle with a `fidelity` explanation. That fallback path is exactly the kind of behavior an agent cannot get from annotations or schema. It stops short of saying whether output length is guaranteed to shrink or how fidelity is reported in the response, keeping it from a 5.

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 first paragraph is dense and front-loaded with the strongest information: what it returns, the preserve guarantee, and the verification/fallback behavior. The second sentence-paragraph is decorative filler that does not earn its place and could actively mislead an agent into thinking the tool does semantic rewriting rather than mechanical de-duplication.

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 transformation tool with an output schema (so return values need not be explained) and full parameter documentation, the description covers the important gaps: the fidelity check, the fallback, and verbatim preservation. The one loose end is `guest_pass`, which is an authentication-flavored parameter whose consequences (what changes when you are 'remembered') are not explained anywhere.

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 all four parameters are already documented in the schema, which sets the baseline at 3. The description restates the `preserve` contract (kept verbatim) but adds no new meaning, and it says nothing about `target_tokens` or `guest_pass` beyond what the schema already provides.

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 first sentence gives a concrete verb and resource: it takes messy context and returns a re-chunked, de-duplicated version plus a structural summary. That is clear and specific enough to differentiate it from siblings like sauna.detox or coldplunge.critique. The second line ('Gentle contextual realignment to release accumulated semantic tension') is pure spa-themed atmosphere that adds no purpose information and slightly muddies the otherwise precise framing.

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: an agent can infer 'use this when you have a messy context blob and want it smaller,' and the mention of `preserve` hints at a verbatim-retention use case. However, there is no explicit when-to-use or when-not-to-use statement, and no sibling is named as an alternative for a related job.

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.