By Sagar Shankaran, Founder of CallSphere
Code-level Claude patterns for finance agents: narrow tools, cite-or-refuse prompts, lean context, plan-then-execute, and typed, auditable output.
Key takeaways
The first finance plugin you ship works. The fifth one is a mess — unless you've found the patterns that repeat across reconciliation, flux analysis, accruals, and reporting, and factored them out. After building several of these, the same handful of structural moves keep showing up: how you shape a tool, how you frame a prompt, how you decide what enters context, and how you keep the agent honest about numbers. This post is a catalog of those reusable patterns, with the actual code shapes you'd copy into a new finance plugin.
The tempting first design is a single run_sql(query) tool. It feels flexible, but it pushes all the correctness burden onto the model and makes every call hard to review. The pattern that scales is a set of narrow, intent-named tools — get_trial_balance, get_account_detail, get_prior_period — each with strict schemas. The model picks an intent; the server owns the SQL.
{
"name": "get_account_detail",
"description": "Line-item transactions for one account in a period.",
"input_schema": {
"type": "object",
"properties": {
"account_code": { "type": "string" },
"period": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}$" },
"limit": { "type": "integer", "maximum": 500 }
},
"required": ["account_code", "period"]
}
}
The limit cap is a quiet but vital pattern: it stops the agent from pulling a million rows into context when it only needs to spot a variance driver.
Finance can't tolerate a confident hallucinated number. The cite-or-refuse pattern lives in the sub-agent's instructions and is short: every figure in the output must be traceable to a specific tool result, and if it isn't, the agent says so rather than guessing. This single rule converts the agent from a plausible-sounding assistant into one whose numbers you can check.
Hear it before you finish reading
Talk to a live CallSphere AI voice agent in your browser — 60 seconds, no signup.
You report only figures returned by a tool call this session.
For each number, name the tool and the row it came from.
If a figure is not available from a tool, write "not available"
and do NOT estimate it.
The flow this enforces — and where it diverges to a safe refusal — is worth drawing out.
flowchart TD
A["Agent needs a figure"] --> B{"From a tool result?"}
B -->|Yes| C["Cite tool + row"]
B -->|No| D{"Can a tool fetch it?"}
D -->|Yes| E["Call the tool"] --> C
D -->|No| F["Write 'not available'"]
C --> G["Include in report"]
F --> G
For anything multi-step — a close, an accrual run — have the agent emit a short plan before it touches data, then execute it. The plan is cheap to review and catches scope errors early. In practice this is a two-phase prompt: phase one asks for an ordered step list referencing tools by name; phase two runs the steps. A reviewer (or a gate) can approve the plan before any write tool fires.
The hardest pattern is contextual discipline. Procedure belongs in skills, loaded on demand. Facts belong in tools, fetched fresh. The system prompt should be small: role, tone, guardrails. Anything you can fetch, fetch — don't paste last month's trial balance into the prompt where it goes stale and consumes tokens.
| Content | Where it goes | Why |
|---|---|---|
| Close procedure | Skill | Loaded only when relevant |
| Trial balance data | Tool result | Always fresh, never stale |
| Role + guardrails | System prompt | Always-on, kept tiny |
| Materiality thresholds | Skill resource | Cited policy, versioned |
A finance agent's output usually feeds another system — a review queue, a workpaper, a dashboard. Have it emit a structured table or JSON with a fixed shape, then attach the narrative separately. This makes the result machine-ingestible and diffable against prior runs, which is how you catch regressions.
Still reading? Stop comparing — try CallSphere live.
CallSphere ships complete AI voice agents per industry — 14 tools for healthcare, 10 agents for real estate, 4 specialists for salons. See how it actually handles a call before you book a demo.
limit on detail queries floods context and degrades reasoning. Cap row counts at the schema.limit to every detail-level tool.You write a handful and reuse them across plugins. A dozen well-named finance tools cover most workflows, and each is far easier to test and audit than one query tool that can do anything.
It makes it less confidently wrong. For finance, an honest "not available" is far more useful than a fabricated number, and it surfaces exactly where your tool coverage has gaps.
Version the skill resources like code and reference the same materiality and policy files your team already maintains. The skill cites them, so when policy changes you update one source.
These structural patterns — narrow tools, cite-or-refuse, lean context — are exactly how CallSphere keeps its agentic voice and chat assistants accurate while they answer calls, look up records live, and book work 24/7. See the patterns at work at callsphere.ai.
Source & attribution: This is an independent, original explainer inspired by Anthropic's coverage on the Claude blog. Claude, Claude Code, Claude Cowork, Claude Opus, and the Model Context Protocol are products and trademarks of Anthropic. CallSphere is not affiliated with or endorsed by Anthropic.

Written by
Sagar Shankaran· Founder, CallSphere
LinkedInSagar Shankaran is the founder of CallSphere, where he builds production AI voice and chat agents deployed across healthcare, hospitality, real estate, and home services. He writes about agentic AI, LLM engineering, and shipping voice agents that handle real calls in production.
See how AI voice agents work for your industry. Live demo available -- no signup required.
The monthly IEEE 1366 reliability close takes 64 hours across three people. What goal-driven agents change, the arithmetic, and what stays with the engineer.
How pest control service managers hand the monthly food-account trend packet to a 2026 work agent as a goal - and what has to change about assigning work.
The phased plan, insurance estimate, predetermination narrative and financing page, finished before the patient leaves. What the owner has to change to get it.
Why co-pack quotes take six days, and how 2026 agents that return finished work rebuild the packet — costed formula, freight, spec sheet — in two hours.
A 1/1 commercial submission packet costs an account manager nine hours, eight of them gathering. In 2026 you hand over the goal and review the finished packet.
The Thursday production packet - prep list, vendor POs, staffing, rentals - built as one goal. Worked food-waste math and the habits an owner must change.
© 2026 CallSphere Inc. All rights reserved.
Made within San Francisco
Watch how CallSphere handles real customer calls, schedules appointments, and processes payments — live.
Try Live DemoBook a DemoCalculate Your ROI