Skip to main content
Glama

get_last_receipt_result

Read-only

Check the authoritative final outcome of a receipt image/PDF batch submitted with submit_receipt. After submit_receipt returns submissionId, call this tool with that exact ID using the polling interval and time allowance in the submit_receipt response. A small batch allows at least 5 minutes; larger batches allow longer. A pending result is normal and must not trigger a duplicate resubmission. Returns added, duplicate, skipped, or errored verdicts with exact counts and up to 10 processed receipt summaries. found:false is pending and has no terminal verdict; found:true is terminal. On completion, tell the user what happened and show spreadsheetUrl plus reviewExpensesUrl. This is for uploaded receipts; use get_scan_status for Gmail scans. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
submissionIdNoExact submissionId returned by submit_receipt. Strongly preferred because it binds the result to this upload instead of an earlier receipt.
withinSecondsNoFallback lookback window when submissionId is unavailable (30-3600 seconds; default 600).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
foundYes
stateNoPresent on pending polls for a specific submission.
countsNo
messageYes
successYes
verdictNoTerminal branch only.
receiptsNo
timestampNo
submissionIdNo
spreadsheetUrlNo
reviewExpensesUrlNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed18 schema fields changed
    • addedOutput schema / allOf
      Added value: +[
      +  {
      +    "if": {
      +      "properties": {
      +        "found": {
      +          "const": true
      +        }
      +      },
      +      "required": [
      +        "found"
      +      ]
      +    },
      +    "then": {
      +      "required": [
      +        "verdict",
      +        "counts",
      +        "receipts",
      +        "submissionId",
      +        "spreadsheetUrl",
      +        "reviewExpensesUrl",
      +        "data",
      +        "timestamp"
      +      ]
      +    }
      +  }
      +]
    • changedOutput schema / description
      Previous value: -"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."New value: +"found:false means processing is still pending; found:true is a terminal result."
    • addedOutput schema / properties / counts
      Added value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "added": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "duplicates": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "errors": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "skipped": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "submitted": {
      +      "minimum": 0,
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "submitted",
      +    "added",
      +    "duplicates",
      +    "skipped",
      +    "errors"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / properties / data / description
      Removed value: -"Structured payload. Shape varies per tool — common keys: total, breakdown, comparison, sampleMeta, ids, expenseId, reportId, signupUrl, results."
    • removedOutput schema / properties / error
      Removed value: -{
      -  "additionalProperties": true,
      -  "description": "Present only when success === false.",
      -  "properties": {
      -    "code": {
      -      "type": "string"
      -    },
      -    "hint": {
      -      "type": "string"
      -    },
      -    "message": {
      -      "type": "string"
      -    }
      -  },
      -  "type": "object"
      -}
    • addedOutput schema / properties / found
      Added value: +{
      +  "type": "boolean"
      +}
    • removedOutput schema / properties / message / description
      Removed value: -"Human-readable result text. Always present on success; prefer rendering this verbatim before any further reasoning."
    • addedOutput schema / properties / receipts
      Added value: +{
      +  "items": {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / reviewExpensesUrl
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / sampleMeta
      Removed value: -{
      -  "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"
      -}
    • addedOutput schema / properties / spreadsheetUrl
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / state
      Added value: +{
      +  "const": "processing",
      +  "description": "Present on pending polls for a specific submission.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / submissionId
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / success / const
      Added value: +true
    • removedOutput schema / properties / success / description
      Removed value: -"False on tool errors; check before reading `data`."
    • addedOutput schema / properties / timestamp
      Added value: +{
      +  "format": "date-time",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / verdict
      Added value: +{
      +  "description": "Terminal branch only.",
      +  "enum": [
      +    "added",
      +    "duplicate",
      +    "skipped",
      +    "errored",
      +    "mixed",
      +    "unknown"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / required
      Added value: +[
      +  "success",
      +  "found",
      +  "message"
      +]
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, but the description adds rich behavioral context beyond that: it explains the pending vs. terminal semantics (found:false vs. found:true), the verdict types (added, duplicate, skipped, errored), the counts and summaries returned, and that on completion the agent should show specific URLs. It also notes the tool is read-only, but since that's already in annotations, the extra behavioral details carry the weight. 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?

The description is relatively long but every sentence delivers meaningful guidance (workflow, polling, pending handling, return semantics, URLs to show, alternative tool). It is front-loaded with the core purpose. The only minor redundancy is the final 'Read-only.' which duplicates the annotation, but overall it is well-structured and dense with useful content.

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?

Given the tool's complexity, the description covers all necessary aspects: what it does, how to call it (submissionId and polling), what happens when pending vs. terminal, what the return values are (verdicts, counts, URLs), and when to use an alternative. There is an output schema, but the description already explains the key return semantics in a way the agent can act on. Nothing critical 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?

The input schema already covers both parameters with descriptions, so the baseline is 3. The description adds value by clarifying that submissionId must be the exact ID returned by submit_receipt and that the polling interval and time allowance from that response should be used. It reinforces the relationship between the parameters and the submission workflow, slightly exceeding schema information.

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 states a specific verb ('Check') and resource ('authoritative final outcome of a receipt image/PDF batch submitted with submit_receipt'), making the tool's purpose immediately clear. It also explicitly distinguishes itself from the sibling get_scan_status by saying 'use get_scan_status for Gmail scans', which helps the agent differentiate without opening schemas.

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?

The description provides explicit guidance on when to call this tool: after submit_receipt returns a submissionId, using the exact ID and polling interval from the response. It warns that a pending result is normal and should not trigger duplicate resubmission. It also names the alternative tool for Gmail scans, giving a clear exclusion condition.

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.

TDQS

A3.6/5.0
Disambiguation3/5

Most tools are explicitly scoped, but several analytics/retrieval tools overlap in purpose, such as get_spending_summary vs get_deep_analytics vs get_monthly_books_review, and generic search vs search_expenses vs search_knowledge. The detailed descriptions help, but an agent still has to carefully choose between near-equivalent options like correct_expenses vs update_expense and the three add_income variants.

Naming Consistency5/5

Tool names consistently use lower_snake_case with a recognizable verb prefix: get_*, list_*, add_*, create_*, check_*, scan_*, search_*, and whatif_*. Minor exceptions like fetch and search are still terse retrieval verbs rather than a different naming style, so the overall pattern is predictable.

Tool Count1/5

With 59 tools, this exceeds the 50+ threshold for an extreme tool count and creates a heavy selection surface for an agent. Even though ExpenseBot covers many subdomains, many get_/list_/add_ variants could be consolidated into fewer parameterized tools. The count undermines the otherwise clear naming structure.

Completeness3/5

The surface is strong for creating, reading, and updating expenses, reports, invoices, and Gmail scans, but there are notable lifecycle gaps: no delete/void tools for expenses, income, reports, or invoices, and no update tool for income. Several descriptions explicitly redirect unsupported edits to the web app, confirming that the assistant cannot complete those workflows directly.