Skip to main content
Glama

Context formatting review

compress_agent_context
Read-onlyIdempotent

Return a blank-line compaction candidate for human review. Preserves words and role headers. No verified token savings, semantic equivalence or speed improvement. Paid: 0.05 USDC per accepted analysis, including an unfavorable advisory result. Check get_utility_service_status with service='compress_agent_context' and the free fixed example first. Owner-authorized x402 payment is required; tool discovery does not authorize spending.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
raw_conversation_historyYesCaller-supplied text; do not submit secrets or private tenant data.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed1 schema field changed
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "contract_version": {
      -        "const": "ardaro.agent-utilities.response.v1"
      -      },
      -      "identities": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "analysis_result_identity": {
      -            "pattern": "^res_[0-9a-f]{64}(?![\\s\\S])",
      -            "type": "string"
      -          },
      -          "payment_identity": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "protocol": {
      -                "const": "x402-v2"
      -              },
      -              "reference": {
      -                "pattern": "^pay_[0-9a-f]{64}(?![\\s\\S])",
      -                "type": "string"
      -              },
      -              "replayed": {
      -                "type": "boolean"
      -              }
      -            },
      -            "required": [
      -              "protocol",
      -              "reference",
      -              "replayed"
      -            ],
      -            "type": "object"
      -          }
      -        },
      -        "required": [
      -          "analysis_result_identity",
      -          "payment_identity"
      -        ],
      -        "type": "object"
      -      },
      -      "result": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "candidate_characters": {
      -            "maximum": 32768,
      -            "minimum": 1,
      -            "type": "integer"
      -          },
      -          "characters_removed": {
      -            "maximum": 32767,
      -            "minimum": 0,
      -            "type": "integer"
      -          },
      -          "compressed_prompt_payload": {
      -            "maxLength": 32768,
      -            "minLength": 1,
      -            "type": "string"
      -          },
      -          "compression_ratio": {
      -            "type": "null"
      -          },
      -          "human_review_required": {
      -            "const": true,
      -            "type": "boolean"
      -          },
      -          "latency_or_cost_savings_verified": {
      -            "const": false,
      -            "type": "boolean"
      -          },
      -          "original_characters": {
      -            "maximum": 32768,
      -            "minimum": 1,
      -            "type": "integer"
      -          },
      -          "semantic_preservation_verified": {
      -            "const": false,
      -            "type": "boolean"
      -          },
      -          "status": {
      -            "const": "REVIEW_CANDIDATE",
      -            "type": "string"
      -          },
      -          "tokenizer_used": {
      -            "type": "null"
      -          },
      -          "tokens_saved": {
      -            "type": "null"
      -          },
      -          "transformation": {
      -            "const": "Reduce three or more consecutive LF/CRLF line breaks to two LF line breaks; no words or role headers removed",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "status",
      -          "compressed_prompt_payload",
      -          "transformation",
      -          "original_characters",
      -          "candidate_characters",
      -          "characters_removed",
      -          "tokens_saved",
      -          "tokenizer_used",
      -          "compression_ratio",
      -          "semantic_preservation_verified",
      -          "human_review_required",
      -          "latency_or_cost_savings_verified"
      -        ],
      -        "type": "object"
      -      },
      -      "service_id": {
      -        "const": "ardaro.compress_agent_context"
      -      },
      -      "status": {
      -        "const": "review_required"
      -      }
      -    },
      -    "required": [
      -      "contract_version",
      -      "service_id",
      -      "status",
      -      "result",
      -      "identities"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "contract_version": {
      -        "const": "ardaro.agent-utilities.response.v1"
      -      },
      -      "error": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "code": {
      -            "maxLength": 100,
      -            "type": "string"
      -          },
      -          "message": {
      -            "maxLength": 300,
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "code",
      -          "message"
      -        ],
      -        "type": "object"
      -      },
      -      "status": {
      -        "const": "error"
      -      }
      -    },
      -    "required": [
      -      "contract_version",
      -      "status",
      -      "error"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "$schema": "https://json-schema.org/draft/2020-12/schema",
      -    "additionalProperties": false,
      -    "properties": {
      -      "contract_version": {
      -        "const": "ardaro.agent-receipt-intelligence.response.v1"
      -      },
      -      "error": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "code": {
      -            "maxLength": 80,
      -            "type": "string"
      -          },
      -          "message": {
      -            "maxLength": 280,
      -            "type": "string"
      -          },
      -          "remediation": {
      -            "maxLength": 280,
      -            "type": "string"
      -          },
      -          "retryable": {
      -            "type": "boolean"
      -          },
      -          "service_code": {
      -            "enum": [
      -              "ARDARO_ARITHMETIC_MISMATCH",
      -              "ARDARO_DOCUMENT_TOO_LARGE",
      -              "ARDARO_DUPLICATE_SUSPECTED",
      -              "ARDARO_EXTRACTION_LOW_CONFIDENCE",
      -              "ARDARO_IDEMPOTENCY_CONFLICT",
      -              "ARDARO_INPUT_UNSUPPORTED",
      -              "ARDARO_PAYMENT_INVALID",
      -              "ARDARO_PAYMENT_RECONCILIATION_REQUIRED",
      -              "ARDARO_PAYMENT_REQUIRED",
      -              "ARDARO_RATE_LIMITED",
      -              "ARDARO_SERVICE_UNAVAILABLE"
      -            ]
      -          }
      -        },
      -        "required": [
      -          "code",
      -          "service_code",
      -          "message",
      -          "retryable",
      -          "remediation"
      -        ],
      -        "type": "object"
      -      },
      -      "status": {
      -        "const": "error"
      -      }
      -    },
      -    "required": [
      -      "contract_version",
      -      "status",
      -      "error"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "$schema": "https://json-schema.org/draft/2020-12/schema",
      -    "additionalProperties": false,
      -    "properties": {
      -      "contract_version": {
      -        "const": "ardaro.agent-receipt-intelligence.response.v1"
      -      },
      -      "error": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "code": {
      -            "maxLength": 80,
      -            "minLength": 1,
      -            "type": "string"
      -          },
      -          "message": {
      -            "const": "Service is not ready."
      -          }
      -        },
      -        "required": [
      -          "code",
      -          "message"
      -        ],
      -        "type": "object"
      -      },
      -      "service": {
      -        "const": "ardaro-receipt-intelligence"
      -      },
      -      "status": {
      -        "const": "not_ready"
      -      }
      -    },
      -    "required": [
      -      "contract_version",
      -      "status",
      -      "service",
      -      "error"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "$schema": "https://json-schema.org/draft/2020-12/schema",
      -    "properties": {
      -      "accepts": {
      -        "items": {
      -          "properties": {
      -            "amount": {
      -              "type": "string"
      -            },
      -            "asset": {
      -              "type": "string"
      -            },
      -            "extra": {
      -              "additionalProperties": true,
      -              "type": "object"
      -            },
      -            "maxTimeoutSeconds": {
      -              "type": "integer"
      -            },
      -            "network": {
      -              "type": "string"
      -            },
      -            "payTo": {
      -              "type": "string"
      -            },
      -            "scheme": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "scheme",
      -            "network",
      -            "asset",
      -            "amount",
      -            "payTo",
      -            "maxTimeoutSeconds"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "error": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "extensions": {
      -        "oneOf": [
      -          {
      -            "additionalProperties": true,
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "resource": {
      -        "oneOf": [
      -          {
      -            "properties": {
      -              "description": {
      -                "type": [
      -                  "string",
      -                  "null"
      -                ]
      -              },
      -              "iconUrl": {
      -                "type": [
      -                  "string",
      -                  "null"
      -                ]
      -              },
      -              "mimeType": {
      -                "type": [
      -                  "string",
      -                  "null"
      -                ]
      -              },
      -              "serviceName": {
      -                "type": [
      -                  "string",
      -                  "null"
      -                ]
      -              },
      -              "tags": {
      -                "oneOf": [
      -                  {
      -                    "items": {
      -                      "type": "string"
      -                    },
      -                    "type": "array"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ]
      -              },
      -              "url": {
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "url"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "x402Version": {
      -        "const": 2,
      -        "default": 2,
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "accepts"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "$schema": "https://json-schema.org/draft/2020-12/schema",
      -    "additionalProperties": false,
      -    "properties": {
      -      "error": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "error"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "message": {
      -        "type": "string"
      -      },
      -      "status": {
      -        "const": "error"
      -      }
      -    },
      -    "required": [
      -      "status",
      -      "message"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "contract_version": {
      +        "const": "ardaro.agent-utilities.response.v1"
      +      },
      +      "identities": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "analysis_result_identity": {
      +            "pattern": "^res_[0-9a-f]{64}$",
      +            "type": "string"
      +          },
      +          "payment_identity": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "protocol": {
      +                "const": "x402-v2"
      +              },
      +              "reference": {
      +                "pattern": "^pay_[0-9a-f]{64}$",
      +                "type": "string"
      +              },
      +              "replayed": {
      +                "type": "boolean"
      +              }
      +            },
      +            "required": [
      +              "protocol",
      +              "reference",
      +              "replayed"
      +            ],
      +            "type": "object"
      +          }
      +        },
      +        "required": [
      +          "analysis_result_identity",
      +          "payment_identity"
      +        ],
      +        "type": "object"
      +      },
      +      "result": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "candidate_characters": {
      +            "maximum": 32768,
      +            "minimum": 1,
      +            "type": "integer"
      +          },
      +          "characters_removed": {
      +            "maximum": 32767,
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "compressed_prompt_payload": {
      +            "maxLength": 32768,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "compression_ratio": {
      +            "type": "null"
      +          },
      +          "human_review_required": {
      +            "const": true,
      +            "type": "boolean"
      +          },
      +          "latency_or_cost_savings_verified": {
      +            "const": false,
      +            "type": "boolean"
      +          },
      +          "original_characters": {
      +            "maximum": 32768,
      +            "minimum": 1,
      +            "type": "integer"
      +          },
      +          "semantic_preservation_verified": {
      +            "const": false,
      +            "type": "boolean"
      +          },
      +          "status": {
      +            "const": "REVIEW_CANDIDATE",
      +            "type": "string"
      +          },
      +          "tokenizer_used": {
      +            "type": "null"
      +          },
      +          "tokens_saved": {
      +            "type": "null"
      +          },
      +          "transformation": {
      +            "const": "Reduce three or more consecutive LF/CRLF line breaks to two LF line breaks; no words or role headers removed",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "status",
      +          "compressed_prompt_payload",
      +          "transformation",
      +          "original_characters",
      +          "candidate_characters",
      +          "characters_removed",
      +          "tokens_saved",
      +          "tokenizer_used",
      +          "compression_ratio",
      +          "semantic_preservation_verified",
      +          "human_review_required",
      +          "latency_or_cost_savings_verified"
      +        ],
      +        "type": "object"
      +      },
      +      "service_id": {
      +        "const": "ardaro.compress_agent_context"
      +      },
      +      "status": {
      +        "const": "review_required"
      +      }
      +    },
      +    "required": [
      +      "contract_version",
      +      "service_id",
      +      "status",
      +      "result",
      +      "identities"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "contract_version": {
      +        "const": "ardaro.agent-utilities.response.v1"
      +      },
      +      "error": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "maxLength": 100,
      +            "type": "string"
      +          },
      +          "message": {
      +            "maxLength": 300,
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "status": {
      +        "const": "error"
      +      }
      +    },
      +    "required": [
      +      "contract_version",
      +      "status",
      +      "error"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "$schema": "https://json-schema.org/draft/2020-12/schema",
      +    "additionalProperties": false,
      +    "properties": {
      +      "contract_version": {
      +        "const": "ardaro.agent-receipt-intelligence.response.v1"
      +      },
      +      "error": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "maxLength": 80,
      +            "type": "string"
      +          },
      +          "message": {
      +            "maxLength": 280,
      +            "type": "string"
      +          },
      +          "remediation": {
      +            "maxLength": 280,
      +            "type": "string"
      +          },
      +          "retryable": {
      +            "type": "boolean"
      +          },
      +          "service_code": {
      +            "enum": [
      +              "ARDARO_ARITHMETIC_MISMATCH",
      +              "ARDARO_DOCUMENT_TOO_LARGE",
      +              "ARDARO_DUPLICATE_SUSPECTED",
      +              "ARDARO_EXTRACTION_LOW_CONFIDENCE",
      +              "ARDARO_IDEMPOTENCY_CONFLICT",
      +              "ARDARO_INPUT_UNSUPPORTED",
      +              "ARDARO_PAYMENT_INVALID",
      +              "ARDARO_PAYMENT_RECONCILIATION_REQUIRED",
      +              "ARDARO_PAYMENT_REQUIRED",
      +              "ARDARO_RATE_LIMITED",
      +              "ARDARO_SERVICE_UNAVAILABLE"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "service_code",
      +          "message",
      +          "retryable",
      +          "remediation"
      +        ],
      +        "type": "object"
      +      },
      +      "status": {
      +        "const": "error"
      +      }
      +    },
      +    "required": [
      +      "contract_version",
      +      "status",
      +      "error"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "$schema": "https://json-schema.org/draft/2020-12/schema",
      +    "additionalProperties": false,
      +    "properties": {
      +      "contract_version": {
      +        "const": "ardaro.agent-receipt-intelligence.response.v1"
      +      },
      +      "error": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "maxLength": 80,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "message": {
      +            "const": "Service is not ready."
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "service": {
      +        "const": "ardaro-receipt-intelligence"
      +      },
      +      "status": {
      +        "const": "not_ready"
      +      }
      +    },
      +    "required": [
      +      "contract_version",
      +      "status",
      +      "service",
      +      "error"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "$schema": "https://json-schema.org/draft/2020-12/schema",
      +    "properties": {
      +      "accepts": {
      +        "items": {
      +          "properties": {
      +            "amount": {
      +              "type": "string"
      +            },
      +            "asset": {
      +              "type": "string"
      +            },
      +            "extra": {
      +              "additionalProperties": true,
      +              "type": "object"
      +            },
      +            "maxTimeoutSeconds": {
      +              "type": "integer"
      +            },
      +            "network": {
      +              "type": "string"
      +            },
      +            "payTo": {
      +              "type": "string"
      +            },
      +            "scheme": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "scheme",
      +            "network",
      +            "asset",
      +            "amount",
      +            "payTo",
      +            "maxTimeoutSeconds"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "error": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "extensions": {
      +        "oneOf": [
      +          {
      +            "additionalProperties": true,
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "resource": {
      +        "oneOf": [
      +          {
      +            "properties": {
      +              "description": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "iconUrl": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "mimeType": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "serviceName": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "tags": {
      +                "oneOf": [
      +                  {
      +                    "items": {
      +                      "type": "string"
      +                    },
      +                    "type": "array"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "url": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "url"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "x402Version": {
      +        "const": 2,
      +        "default": 2,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "accepts"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "$schema": "https://json-schema.org/draft/2020-12/schema",
      +    "additionalProperties": false,
      +    "properties": {
      +      "error": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "error"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "message": {
      +        "type": "string"
      +      },
      +      "status": {
      +        "const": "error"
      +      }
      +    },
      +    "required": [
      +      "status",
      +      "message"
      +    ],
      +    "type": "object"
      +  }
      +]
  4. First observed

TDQS

B3.3/5.0
Behavior1/5

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

Description adds meaningful behavioral context (pricing, lack of verified savings, no authorization from discovery alone), but the requirement for paid x402 spending directly conflicts with annotations declaring readOnlyHint=true. Spending money is a state-modifying side effect, so the description contradicts annotations.

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?

Six sentences, all information-dense: purpose, preservation, disclaimers, pricing, prerequisites, authorization. Front-loaded with the core function and no filler. Slightly long but every sentence earns its place.

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?

Handles a complex tool with payment, service-status check, and authorization caveats. Covers what it does, what it does not guarantee, cost, prerequisite, and authorization. Output schema exists, so return values need no description. Missing only error behavior, which is minor.

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 100% and the only parameter is already described in the schema. The description adds that words and role headers are preserved, but does not define expected input format beyond 'raw_conversation_history'. Baseline 3 is appropriate.

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?

States a specific verb-resource pair ('Return a blank-line compaction candidate for human review') and clarifies scope ('Preserves words and role headers'). It is clearly distinct from sibling service-status/authorization tools, though it does not explicitly name an alternative.

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

Usage Guidelines4/5

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

Gives explicit prerequisites: check get_utility_service_status for this service, review the free fixed example first, and notes the payment/authorization requirement. It doesn't explicitly rule out alternatives, but the preconditions are concrete and actionable.

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