Skip to main content
Glama

Trace where a value came from

audit_cell
Read-only

Explain where one value in a query_aql result came from: the provenance (which import, file, user or write, and when) of every stored value behind the cell, and the calculation if the cell is a function or a total. Read-only. Use it when a number looks wrong or the user asks "where does this figure come from?". For the history of a name's attributes and set membership use name_history instead.

Call it with exactly the rowHeadings, columnHeadings and context you passed to query_aql (the query is re-run to locate the cell), plus the zero-based row and col of the cell in that result's rows array. Example: after query_aql returned rows[2][0] = 1250, pass the same three arrays with row 2, col 0.

Returns headline (the cell and its headings), function (the formula, when calculated) and auditForDisplayList - one entry per provenance: user, method, name (the source, e.g. the file), date, context and the values it supplied (capped at 1000). Returns {message: "cell not found"} when row/col is outside the result. Earlier, overwritten values show only while the database records history (history_settings).

Input Schema

NameRequiredDescriptionDefault
colYesZero-based column index of the cell to audit
rowYesZero-based row index of the cell to audit
contextYesContext expressions exactly as passed to query_aql - [[]] if that query had none
businessNoOptional. The business this call is for, by name, e.g. "azquo" - it then runs there whatever business the session is in. Worth giving on writes when you work in more than one business: a new MCP session starts in the login's own business. list_businesses shows the names.
databaseYesDatabase name, as used for the query_aql call
rowHeadingsYesRow heading expressions exactly as passed to query_aql, e.g. [["`Products` children"]]
columnHeadingsYesColumn heading expressions exactly as passed to query_aql, e.g. [["Sales"], ["Jan", "Feb"]]

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / business
      Added value: +{
      +  "description": "Optional. The business this call is for, by name, e.g. \"azquo\" - it then runs there whatever business the session is in. Worth giving on writes when you work in more than one business: a new MCP session starts in the login's own business. list_businesses shows the names.",
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / columnHeadings / description
      Previous value: -"Column heading expressions exactly as passed to query_aql, e.g. [[\"Jan\", \"Feb\"], [\"Sales\"]]"New value: +"Column heading expressions exactly as passed to query_aql, e.g. [[\"Sales\"], [\"Jan\", \"Feb\"]]"
    • changedInput schema / properties / rowHeadings / description
      Previous value: -"Row heading expressions exactly as passed to query_aql, e.g. [[\"children of Products\"]]"New value: +"Row heading expressions exactly as passed to query_aql, e.g. [[\"`Products` children\"]]"
  3. Changed4 schema fields changed
    • addedInput schema / properties / columnHeadings / description
      Added value: +"Column heading expressions exactly as passed to query_aql, e.g. [[\"Jan\", \"Feb\"], [\"Sales\"]]"
    • addedInput schema / properties / context / description
      Added value: +"Context expressions exactly as passed to query_aql - [[]] if that query had none"
    • changedInput schema / properties / database / description
      Previous value: -"Database name"New value: +"Database name, as used for the query_aql call"
    • addedInput schema / properties / rowHeadings / description
      Added value: +"Row heading expressions exactly as passed to query_aql, e.g. [[\"children of Products\"]]"
  4. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the 'Read-only' sentence is redundant, but the description adds real behavior: the query is re-run to locate the cell, provenance values are capped at 1000, a {message: "cell not found"} result for out-of-range row/col, and that overwritten values only surface while history_settings records history. Only permissions/auth context is unstated, so 4 rather than 5.

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?

Front-loaded with purpose, then call pattern, then return shape and edge cases — a sensible order. It is long and the 'Read-only' clause repeats the annotation, but nearly every sentence carries information an agent needs (call pattern, example, error case, history caveat).

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?

No output schema exists, so the description carries the return contract itself (headline, function, auditForDisplayList with per-provenance fields) and covers the failure mode and history dependency. An agent has everything needed to call and interpret this tool correctly.

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 baseline is 3, but the description adds semantics the schema does not: rowHeadings/columnHeadings/context must be passed exactly as in the original query_aql call because the query is re-run, and it works through a concrete example (rows[2][0] = 1250 → row 2, col 0). The database param is merely implied by 'the same three arrays' framing.

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: 'Explain where one value in a query_aql result came from', and enumerates exactly what it resolves (import, file, user or write, and when, plus the calculation). It also names the sibling it is not for, name_history, 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?

Explicit trigger ('Use it when a number looks wrong or the user asks "where does this figure come from?"') plus an explicit alternative and its condition ('For the history of a name's attributes and set membership use name_history instead'). This is the full when-to-use / when-not-to-use pattern.

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