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?". It covers stored values only, not the history of a name's attributes or set membership.

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).

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": {
      "database": "<database>",
      "rowHeadings": "<rowHeadings>",
      "columnHeadings": "<columnHeadings>",
      "context": "<context>",
      "row": "<row>",
      "col": "<col>"
    },
    "name": "audit_cell"
  }
}

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?

Adds substantial behavior beyond the annotations: the query is re-run to locate the cell, row/col outside the result yields {message: 'cell not found'}, provenance lists are capped at 1000, and overwritten values only appear while history_settings retains history. 'Read-only' merely restates readOnlyHint, so it earns no extra credit, but the re-execution and truncation notes are real operational context.

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 prerequisites, then return shape; each paragraph handles a distinct concern and the example is compact and useful. The lone redundancy is 'Read-only', which duplicates readOnlyHint=true, but nothing else is padding.

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?

Although there is no output schema, the description documents the return shape (headline, function, auditForDisplayList with user/method/name/date/context/values) and the not-found path. For a 7-parameter read tool whose main risk is mis-passed query arguments, the argument-reuse rule and cell-indexing example close the remaining gap.

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 baseline is 3, but the description goes further by specifying that rowHeadings, columnHeadings and context must be passed exactly as given to query_aql because the query is re-run, and it clarifies that row/col are zero-based indices into the result's rows array. The worked example (rows[2][0] = 1250 → row 2, col 0) removes any indexing ambiguity.

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: explaining the provenance of one cell in a query_aql result, including its calculation and stored-value chain. It also draws an explicit boundary against a sibling class of question ('not the history of a name's attributes or set membership'), which is exactly the distinction an agent needs against history_settings.

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?

Gives both the trigger ('when a number looks wrong or the user asks where does this figure come from?') and the exclusion (stored values only, not attribute/set-membership history). It also states the prerequisite relationship to query_aql and requires reusing that call's arguments, so there is no ambiguity about when and how to reach for it.

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