read_financial_plan
Read a financial plan structure for a project, including account lines and periods, to discover available accounts before adding new lines.
Instructions
[LOCAL — SOAP financial plan read. No Beta MCP equivalent exists for financial plans.]
Read a financial plan for a project using SOAP FinancialPlanService.
This tool reads the financial plan structure including all account lines, entries, and periods. Use this to discover available accounts before adding new lines with upsert_financial_plan.
Args: entity_key: Project entity key (e.g., "key://2/$Plan/17288") version_key: Financial plan version key (e.g., "key://14/1" for Actual/Forecast) include_entries: If True, include EntryDto arrays for each line. Defaults to False. summary: If True, return only account_keys and period_keys (minimal response). fields: If set, return only these top-level data fields (e.g. ["EntityKey", "VersionKey", "Lines"]).
Returns: Dict with financial plan data including: - EntityKey: Project entity key - VersionKey: Version key - Lines: Array of FinancialPlanLineDto objects with account details (unless summary=True) - ModelDescription: Financial model name - VersionDescription: Version name
Raises: PlanviewValidationError: If entity_key or version_key is invalid PlanviewNotFoundError: If financial plan is not found PlanviewAuthError: If authentication fails PlanviewError: For other errors
Example: # Read financial plan for project 17288, Actual/Forecast version result = await read_financial_plan( entity_key="key://2/$Plan/17288", version_key="key://14/1" )
# Extract available accounts
lines = result.get("data", {}).get("Lines", {}).get("FinancialPlanLineDto", [])
accounts = {}
for line in lines:
account_key = line.get("AccountKey")
if account_key:
accounts[account_key] = {
"description": line.get("AccountDescription"),
"parent": line.get("AccountParentDescription"),
"unit": line.get("Unit"),
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | Optional top-level fields to keep. | |
| summary | No | ||
| entity_key | Yes | ||
| version_key | Yes | ||
| include_entries | No |