Skip to main content
Glama

get_expense_by_id

Read-only

Read one existing expense from the authenticated user's ExpenseBot spreadsheet. Supply the exact expenseId returned by search_expenses (Receipt ID in Column Q), or the user's specified rowNumber. Never invent an identifier. Returns sheetName, rowNumber, headers, values, labeled fields and, when available, reviewExpenseUrl. This tool does not edit, submit, delete, share, or scan anything.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expenseIdNoExact full ExpenseBot Receipt ID from Column Q
rowNumberNo1-indexed sheet row (row 1 is headers, so ≥ 2)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
valuesNo
headersNo
labeledNo
successYes
rowNumberNoResolved sheet row for the expense.
sheetNameNo
reviewExpenseUrlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • removedOutput schema / properties / expense
      Removed value: -{
      -  "additionalProperties": true,
      -  "description": "The expense record.",
      -  "type": "object"
      -}
    • addedOutput schema / properties / headers
      Added value: +{
      +  "items": {},
      +  "type": "array"
      +}
    • addedOutput schema / properties / labeled
      Added value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
    • addedOutput schema / properties / sheetName
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / values
      Added value: +{
      +  "items": {},
      +  "type": "array"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "expense": {
      +      "additionalProperties": true,
      +      "description": "The expense record.",
      +      "type": "object"
      +    },
      +    "reviewExpenseUrl": {
      +      "type": "string"
      +    },
      +    "rowNumber": {
      +      "description": "Resolved sheet row for the expense.",
      +      "type": "integer"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success"
      +  ],
      +  "type": "object"
      +}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "description": "Standard ExpenseBot tool result envelope. `message` is the human-readable summary the AI cites; `data` is the structured payload (totals, breakdowns, ids, etc.). On failure, `success` is false and `error` carries a code/message/hint triple.",
      -  "properties": {
      -    "data": {
      -      "additionalProperties": true,
      -      "description": "Structured payload. Shape varies per tool — common keys: total, breakdown, comparison, sampleMeta, ids, expenseId, reportId, signupUrl, results.",
      -      "type": "object"
      -    },
      -    "error": {
      -      "additionalProperties": true,
      -      "description": "Present only when success === false.",
      -      "properties": {
      -        "code": {
      -          "type": "string"
      -        },
      -        "hint": {
      -          "type": "string"
      -        },
      -        "message": {
      -          "type": "string"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "message": {
      -      "description": "Human-readable result text. Always present on success; prefer rendering this verbatim before any further reasoning.",
      -      "type": "string"
      -    },
      -    "sampleMeta": {
      -      "additionalProperties": true,
      -      "description": "Set when the underlying dataset was truncated. isTruncated=true means the agent saw a sample of `sampleCount` of `totalCount` rows; aggregate totals are still accurate.",
      -      "properties": {
      -        "isTruncated": {
      -          "type": "boolean"
      -        },
      -        "sampleCount": {
      -          "type": "integer"
      -        },
      -        "totalCount": {
      -          "type": "integer"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "success": {
      -      "description": "False on tool errors; check before reading `data`.",
      -      "type": "boolean"
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  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 cover the safety profile (readOnlyHint=true, destructiveHint=false, openWorldHint=true), so the bar is lower; the description still adds value by enumerating what it will not do and by listing the returned payload (sheetName, rowNumber, headers, values, labeled fields, reviewExpenseUrl). No contradiction with 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?

Four short sentences, front-loaded with the core action and the identifier requirement; the closing negative list is slightly redundant with the readOnly annotations but earns its place as explicit scope bounding.

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?

With an output schema present, the description need not explain returns, yet it still covers the zero-required-parameter nuance (must supply one identifier), the identifier provenance, and the non-destructive scope. Nothing an agent needs to call this correctly 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 description coverage is 100%, so the baseline is 3, but the description adds provenance the schema lacks: the expenseId must come from search_expenses and corresponds to Receipt ID in Column Q, and rowNumber is an alternative the user may specify. It also implies that one of the two identifiers must be supplied even though the schema marks neither as required.

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+resource ('Read one existing expense from the authenticated user's ExpenseBot spreadsheet') and immediately scopes it against siblings by declaring it 'does not edit, submit, delete, share, or scan anything', distinguishing it from update_expense, submit_receipt, and the scan_* tools.

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 explicit input-sourcing rules: use the exact expenseId returned by search_expenses (Column Q) or the user's specified rowNumber, and 'never invent an identifier'. It names the alternative tool (search_expenses) that produces the required identifier, so the when-to-use path is unambiguous.

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.