discover_financial_plan_info
Retrieve financial plan accounts and periods for a project, with automatic fallback to a reference project if the target plan is unavailable. Optionally skip target read for faster results on new projects.
Instructions
[LOCAL — financial plan discovery with smart fallback. No Beta MCP equivalent exists.]
Discover financial plan information with smart fallback.
Attempts to read the financial plan for the target project. If that fails (e.g., project is too new), falls back to reading a reference project's financial plan to discover available accounts and periods.
Optimized to check config data first (instant), and skip slow target reads for new projects when skip_target_read=True. Use include_entries=False (default for this tool) to avoid large EntryDto arrays and reduce payload size.
Args: entity_key: Target project entity key (e.g., "key://2/$Plan/17291") version_key: Financial plan version key (default: "key://14/1" for Actual/Forecast) reference_entity_key: Optional reference project entity key for fallback. Defaults to None - if not provided and target read fails, returns config data. skip_target_read: If True, skip reading target project's plan (much faster for new projects). Defaults to False for backward compatibility. include_entries: If False, strip EntryDto arrays from each line (default False for smaller response). summary: If True, return only account_keys and period_keys (minimal response). fields: If set, return only these top-level data fields.
Returns: Dict with financial plan data including accounts and periods, or None if unavailable. May return config-based data structure for fast path.
Example: # Fast path for new projects - skip target read, use config or reference plan_info = await discover_financial_plan_info( entity_key="key://2/$Plan/17291", reference_entity_key="key://2/$Plan/3818", skip_target_read=True # Skip slow read for new project )
# Standard path - try target first, then reference
plan_info = await discover_financial_plan_info(
entity_key="key://2/$Plan/17291",
reference_entity_key="key://2/$Plan/3818"
)
if plan_info:
# Extract accounts and periods
lines = plan_info.get("data", {}).get("Lines", {}).get("FinancialPlanLineDto", [])Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | ||
| summary | No | ||
| entity_key | Yes | ||
| version_key | No | key://14/1 | |
| include_entries | No | ||
| skip_target_read | No | ||
| reference_entity_key | No |