Skip to main content
Glama

palace_gain

Reports how much value Palace MCP tools deliver from local usage logs—hits, tokens saved, duplicate skips, recall, latency, and per-project totals—so users can assess ROI.

Instructions

Report how much value Palace's MCP tools have delivered, from a local usage log: hits, estimated tokens saved, skipped duplicates, recall rate, latency, and per-project totals. Use it when the user asks whether Palace is paying off; for database or model health use palace_verify instead. Read-only by default. Three options change it: history=true returns raw recent events instead of the summary; record={...} stores feedback on one search hit (a write); reset=true permanently deletes usage events (for one project, or all projects when project is omitted), so only reset when the user asks.

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": "palace_gain"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoNumber of events when history=true (default: 20)
resetNoIrreversibly delete usage events for `project`, or for all projects if `project` is omitted
sinceNoTime window like 7d, 24h, 30d, or all (default: 30d)
recordNoFeedback on one search result. When omitted, palace_gain returns the normal read-only summary.
historyNoReturn the most recent usage events instead of the summary
projectNoProject to filter by (optional; default is every project)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv0.20.7
    • changedInput schema / properties / history / description
      Previous value: -"Return recent usage events instead of summary"New value: +"Return the most recent usage events instead of the summary"
    • changedInput schema / properties / limit / description
      Previous value: -"History limit (default: 20)"New value: +"Number of events when history=true (default: 20)"
    • changedInput schema / properties / project / description
      Previous value: -"Project to filter by (optional)"New value: +"Project to filter by (optional; default is every project)"
    • changedInput schema / properties / record / description
      Previous value: -"Optional explicit feedback record. When omitted, palace_gain returns the normal read-only summary."New value: +"Feedback on one search result. When omitted, palace_gain returns the normal read-only summary."
    • addedInput schema / properties / record / properties / drawer_id / description
      Added value: +"The id of the result drawer being rated"
    • addedInput schema / properties / record / properties / note / description
      Added value: +"Optional free-text reason"
    • addedInput schema / properties / record / properties / query_id / description
      Added value: +"The query_id returned by the palace_search call being rated"
    • addedInput schema / properties / record / properties / verdict / description
      Added value: +"Whether the result helped"
    • changedInput schema / properties / reset / description
      Previous value: -"Delete usage events for the project, or all projects if omitted"New value: +"Irreversibly delete usage events for `project`, or for all projects if `project` is omitted"
    • changedInput schema / properties / since / description
      Previous value: -"Window like 7d, 24h, 30d, or all (default: 30d)"New value: +"Time window like 7d, 24h, 30d, or all (default: 30d)"
  2. First observedv0.20.5

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full burden and does so: it declares the default is read-only, flags record as a write, and warns that reset permanently deletes events at either project or all-project scope. It also identifies the data source (a local usage log), which tells the agent the numbers are observational rather than live system state.

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 the alternative routing are front-loaded before any parameter detail, and every sentence carries information. The 'Three options change it' sentence is dense but dense with distinct behaviors rather than filler, though it packs three separate mode semantics into one long clause chain.

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?

There is no output schema, yet the description enumerates the return payload closely enough to set expectations. It also covers the three mutating/alternate modes and the destructive scope of reset, so nothing an agent needs in order to call this safely and interpret the result 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?

Schema coverage is 100%, so the schema already documents every parameter and the baseline would be 3. The description nonetheless adds non-obvious meaning: that history swaps the summary for raw events, that project scoping interacts with reset's blast radius, and that record targets one specific search hit. It leaves since and limit entirely to the schema, which costs it the top score.

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 description names a specific verb and resource: it reports delivered value from a local usage log, and enumerates the exact metrics (hits, tokens saved, skipped duplicates, recall rate, latency, per-project totals). It also explicitly distinguishes itself from palace_verify ('for database or model health use palace_verify instead'), so an agent can separate the two without opening either 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 a concrete triggering condition ('when the user asks whether Palace is paying off') and names the alternative tool plus the condition that selects it. The second half goes further, stating when each mode applies (history for raw events, record for feedback, reset only when the user asks), which is unusually thorough routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.