Skip to main content
Glama

Get fiscal calendar

get-fiscal-calendar
Read-onlyIdempotent

Get the current fiscal calendar state — what period is next to close, what's blocking it.

NEW TO THE CLOSE? Call get-close-playbook first — it lays out the full tool sequence, the schedule-setup decisions, and the gotchas this tool's output assumes you know.

WHEN TO USE:

  • At the START of every close session — check what period you're working on

  • Before calling close-period — verify it will succeed (check closeable_now)

  • To check catch-up state when a user is behind ("close the books — I'm 3 months behind")

PARAMETERS:

  • entity_id (optional): the entity whose calendar to read; omit for the group parent. Each entity of the group closes on its own calendar

RETURNS:

  • entity_id: the entity this calendar belongs to

  • closed_through: latest period actually closed (YYYY-MM) or null if never closed

  • close_target: the period the user wants closed through (YYYY-MM)

  • gap_periods: number of periods between closed_through and close_target

  • catch_up_sequence: ordered list of periods a close run would process

  • closeable_now: true if the next period can be closed right now

  • blockers: list of blocker codes if closeable_now is false:

    • sequence_violation: trying to close a non-sequential period

    • period_incomplete: the month hasn't ended yet (current month)

    • sync_stale: QB sync is older than the period end

    • calendar_not_initialized: fiscal calendar not yet set up

    • pending_obligations: matured schedule obligations not yet promoted (count + sample ride on the response)

    • stranded_obligations: matured obligations already classified but with no drafted closing entry — adjusting entries a close would silently omit (count + sample ride on the response)

    • reconciling_items: posted events whose source payload changed afterwards and that nobody has dispositioned — resolve each with resolve-reconciling-item (count + sample ride on the response)

    • unposted_source_events: source events dated in the period were never committed (inbox lines still captured or classified, or a QuickBooks transaction whose automatic posting failed) and cannot post into it once it closes — commit or void each (count + sample ride on the response)

    • unreconciled_accounts: a reconciliation the close waits on is not reconciled for the period, or was never compared for it — run refresh-reconciliations (count + sample ride on the response)

    • unmapped_accounts: an account with postings through the period that the chart's mapping does not map to a concept, so its balances are in no statement — map it with suggest-mapping and create-mapping-association; nothing lifts this one (count + sample ride on the response)

    • held_bank_lines: bank lines a sync held out of an earlier, closed month (dated there, arriving after it closed) that no close has decided on — reopen that month, which gives them back to post, or close over them with allow_held_bank_lines (count + sample ride on the response)

    • On the consolidation entity, whose close is the group's (each names its items in the matching group_* list): entity_open — an entity the month consolidates has not closed it; adjustments_unposted — the month's consolidating entries are neither held nor drafted, run propose-consolidation-entries; residual_unexplained — a residual or intercompany disagreement is left; consolidated_does_not_foot — the consolidated balance sheet or equity statement fails its checks

  • last_sync_at: most recent QB sync timestamp (null if no QB connection)

  • periods: list of all fiscal period rows with status

WORKFLOW:

  1. Call this first to orient yourself

  2. If closeable_now is true, proceed with drafting

  3. If blocked by sync_stale, tell user to sync QB first

  4. If blocked by period_incomplete, tell user the month hasn't ended

  5. If blocked by pending_obligations or stranded_obligations, run promote-obligations (dispatch_handlers=true) — it reaches both — then re-check 5b. If blocked by reconciling_items, work each with preview-reconciling-item then resolve-reconciling-item, then re-check

  6. If gap_periods > 1, the user is behind — acknowledge and plan a catch-up

NOTES: Read-only — safe to call repeatedly, no side effects.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get-fiscal-calendar"
  }
}

Input Schema

NameRequiredDescriptionDefault
entity_idNoThe entity whose books this acts on, by id (get-graph-info lists them). Omit for the group parent.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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, idempotentHint and destructiveHint=false, so the description's "Read-only — safe to call repeatedly, no side effects" is largely redundant. It does add real behavior beyond annotations: results depend on external QuickBooks sync freshness (last_sync_at is null with no QB connection), an uninitialized fiscal calendar is a possible state, and each entity closes on its own calendar. It stops short of anything on latency or how stale a calendar row can be.

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?

Strongly front-loaded: the one-line purpose, a corrective pointer to the playbook, then WHEN TO USE, PARAMETERS, RETURNS, WORKFLOW, NOTES. The cost is bulk — the blocker list runs to a dozen codes with per-code remediation, and the phrase "(count + sample ride on the response)" is repeated nine times where one statement of the convention would do.

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?

There is no output schema, so the description carries the return contract and does so exhaustively: every field of the response and every blocker code is enumerated with its meaning and remedy. For a single-optional-parameter diagnostic tool, nothing an agent needs in order to interpret closeable_now 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 coverage is 100% for the single entity_id parameter, so the baseline is 3. The description adds genuine meaning beyond the schema by noting that omitting it reads the group parent and that each group entity closes on its own calendar — implying a per-entity result set rather than a single global one.

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?

Opens with a specific verb and resource plus the two concrete outputs that define the tool: "what period is next to close, what's blocking it." That framing is distinct from close-period (which mutates) and from orienting tools like get-close-playbook, so an agent can place it immediately.

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 WHEN TO USE block gives three explicit triggering situations (start of every close session, pre-flight before close-period, catch-up diagnosis) and routes new users to get-close-playbook first. The WORKFLOW section then maps each blocked state to a named next tool (promote-obligations, refresh-reconciliations, resolve-reconciling-item), covering when-to-use and what-to-do-next.

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.