[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [Fiscal.ai template metric definitions](https://spiral.ai/integrations/opencode/fiscal-ai-template-metric-definitions)

# How to Use Fiscal.ai template metric definitions in opencode

Returns metric definitions and component breakdowns within a reporting template and statement. Use it to check what an accounting line includes before building a comparison or model.

|  |  |
| --- | --- |
| Model | Fiscal.ai template metric definitions |
| Available through | Alexandria |
| Category | Finance |
| Price | $0.013 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Fiscal.ai template metric definitions in opencode

- Use Fiscal.ai template metric definitions to inspect total revenue in the standard income statement template. Compare its definition and returned components with our worksheet documentation.
- Use Fiscal.ai template metric definitions to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from Fiscal.ai template metric definitions and tell me what changed since last week.
- Check Fiscal.ai template metric definitions and summarize what you find in three bullet points.
- Pull the newest data from Fiscal.ai template metric definitions and give me the result as a table.

## How to set up Fiscal.ai template metric definitions in opencode

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the server**: Leave out `--global` to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

```bash
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
```

2. **Sign in**: Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, `/mcps` starts the same sign-in.

```bash
opencode mcp auth spiral
```

3. **Check it**: Spiral shows as connected.

```bash
opencode mcp list
```

### Use the Spiral skill

1. **Send opencode this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run Fiscal.ai template metric definitions**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "fiscal-ai/metrics/standardized-by-template",
    "input": {
      "templateType": "<templateType>",
      "statementType": "income-statement"
    }
  }'
```

Then paste one of the prompts above: opencode finds Fiscal.ai template metric definitions on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/opencode

## Fiscal.ai template metric definitions tools and prices

- [Fiscal.ai · Standardized metrics by template](https://spiral.ai/tools/alexandria/fiscal-ai/metrics/standardized-by-template) (Alexandria): $0.013 per call.

## What can you do with Fiscal.ai template metric definitions in opencode?

Check a financial application's metric mappings against Fiscal.ai's accounting definitions. A coding agent can inspect project labels and calculations, then propose corrections using returned identifiers, formulas, and template details.

### Prepare a peer comparison

Choose accounting lines and ratio definitions for an internal Microsoft and Alphabet comparison before collecting company figures.

### Review a financial model's assumptions

Check whether a model's labels and calculations agree with Fiscal.ai's metric definitions. Flag differences for the analyst to resolve.

### Explain dashboard measures

Draft internal help text that explains the accounting lines and ratios behind a research dashboard.

### Review metric changes

Compare the definitions needed by an active research application and flag changed identifiers, names, or calculation details for review.

### Design a sector-specific worksheet

Inspect accounting concepts and template definitions before laying out an internal bank, insurer, REIT, or utility worksheet.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All opencode guides](https://spiral.ai/integrations/opencode)

## Fiscal.ai template metric definitions in other agents

- [Amp](https://spiral.ai/integrations/amp/fiscal-ai-template-metric-definitions)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/fiscal-ai-template-metric-definitions)
- [Claude](https://spiral.ai/integrations/claude-desktop/fiscal-ai-template-metric-definitions)
- [Claude Code](https://spiral.ai/integrations/claude-code/fiscal-ai-template-metric-definitions)
- [Cline](https://spiral.ai/integrations/cline/fiscal-ai-template-metric-definitions)
- [Codex](https://spiral.ai/integrations/codex/fiscal-ai-template-metric-definitions)
- [Cursor](https://spiral.ai/integrations/cursor/fiscal-ai-template-metric-definitions)
- [Devin](https://spiral.ai/integrations/devin/fiscal-ai-template-metric-definitions)
- [dots](https://spiral.ai/integrations/dots/fiscal-ai-template-metric-definitions)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/fiscal-ai-template-metric-definitions)
- [Gemini](https://spiral.ai/integrations/gemini/fiscal-ai-template-metric-definitions)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/fiscal-ai-template-metric-definitions)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/fiscal-ai-template-metric-definitions)
- [goose](https://spiral.ai/integrations/goose/fiscal-ai-template-metric-definitions)
- [Grok](https://spiral.ai/integrations/grok/fiscal-ai-template-metric-definitions)
- [Grok Build](https://spiral.ai/integrations/grok-build/fiscal-ai-template-metric-definitions)
- [Hermes](https://spiral.ai/integrations/hermes/fiscal-ai-template-metric-definitions)
- [Instinct](https://spiral.ai/integrations/instinct/fiscal-ai-template-metric-definitions)
- [Manus](https://spiral.ai/integrations/manus/fiscal-ai-template-metric-definitions)
- [Muse](https://spiral.ai/integrations/muse/fiscal-ai-template-metric-definitions)
- [Muse Code](https://spiral.ai/integrations/muse-code/fiscal-ai-template-metric-definitions)
- [n8n](https://spiral.ai/integrations/n8n/fiscal-ai-template-metric-definitions)
- [Notion](https://spiral.ai/integrations/notion/fiscal-ai-template-metric-definitions)
- [OpenClaw](https://spiral.ai/integrations/openclaw/fiscal-ai-template-metric-definitions)
- [Perplexity](https://spiral.ai/integrations/perplexity/fiscal-ai-template-metric-definitions)
- [Raycast](https://spiral.ai/integrations/raycast/fiscal-ai-template-metric-definitions)
- [VS Code](https://spiral.ai/integrations/vscode/fiscal-ai-template-metric-definitions)
- [Windsurf](https://spiral.ai/integrations/windsurf/fiscal-ai-template-metric-definitions)
- [Zapier](https://spiral.ai/integrations/zapier/fiscal-ai-template-metric-definitions)

## More opencode guides

- [Fiscal.ai stock split history](https://spiral.ai/integrations/opencode/fiscal-ai-stock-split-history)
- [Forex Factory economic calendar](https://spiral.ai/integrations/opencode/forex-factory-economic-calendar)
- [Fiscal.ai standardized metric catalog](https://spiral.ai/integrations/opencode/fiscal-ai-standardized-metric-catalog)
- [Forex Factory event details](https://spiral.ai/integrations/opencode/forex-factory-event-details)
- [Fiscal.ai standardized income statement](https://spiral.ai/integrations/opencode/fiscal-ai-standardized-income-statement)
- [Forex Factory indicator chart data](https://spiral.ai/integrations/opencode/forex-factory-indicator-chart-data)

## Questions about Fiscal.ai template metric definitions in opencode

**Can opencode use Fiscal.ai template metric definitions?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Fiscal.ai template metric definitions like any built-in tool.

**How much does Fiscal.ai template metric definitions cost in opencode?**

$0.013 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

**Do I need an Alexandria account to use Fiscal.ai template metric definitions in opencode?**

No. Spiral runs Fiscal.ai template metric definitions on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Fiscal.ai template metric definitions in opencode?**

About two minutes: add the server, then sign in, then check it.

**Does opencode wait while Fiscal.ai template metric definitions runs?**

Fiscal.ai template metric definitions runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

**Do these lookups return company financial results?**

They return accounting metadata: metric identifiers, definitions, formulas, and template information. Company-period financial values require separate financial statement or ratio data.

**Does Fiscal.ai use the same accounting structure for every business?**

Fiscal.ai gives banks, insurers, REITs, and utilities their own statement structures. Check the reporting template before choosing measures for a comparison.

**Can standardized metric definitions change?**

Yes. Fiscal.ai explicitly recognizes additions, removals, and renamings of standardized metrics in its template metric mapping updates.

**How do Fiscal.ai's financial ratios relate to statement metrics?**

Fiscal.ai states its ratio formulas in terms of standardized metrics. Historical daily values are available only for ratios marked as supporting daily data.

**Can Fiscal.ai data be used to train an AI model?**

Fiscal.ai requires express written authorization to use its data for model training, fine-tuning, or improvement. Its data license also remains limited to the permitted use case.

