Skip to content
Dark MatterDark Matter

Generate Report Tool

AI-driven reporting over DMTR data.

Planned, not yet shipped. The deployed MCP server is the energy toolset. This general registry tool is designed but not implemented; the shape below may change.

What problem it solves

The generate-report tool produces AI-driven reports over DMTR data. Users ask for "a portfolio summary" or "transfer feasibility report for Q1" and the tool fetches relevant data, structures it, and returns a report-ready format. The LLM can then refine or present the report. It automates report generation that would otherwise require manual API calls and formatting.

Input schema

{
  "report_type": "string (required) - portfolio_summary | transfer_feasibility | compliance_summary | custom",
  "scope": "object (required) - { portfolio_ids?: string[], participant_ids?: string[], date_range?: { from, to } }",
  "format": "string (optional) - markdown | json (default markdown)",
  "sections": "array of strings (optional) - Specific sections to include"
}

Report type determines the structure. Custom reports use sections to specify which blocks to include.

Output schema

{
  "report": "string - Report content (markdown or JSON per format)",
  "generated_at": "ISO8601 - Generation timestamp",
  "data_sources": "array - IDs of positions/portfolios/events used"
}

The report is pre-formatted for display or further LLM processing.

Idempotency

Idempotent for read-only report types. Same input produces same output (subject to data changes). No writes.

Side effects

None for standard report types. The tool only reads data and formats it. Custom report types may trigger cached computations; no persistent state is written.

Required scopes

  • positions:read
  • portfolios:read
  • participants:read
  • events:read (for compliance_summary with audit data)

Safe and unsafe contexts

Safe for all contexts. Read-only. Suitable for sandbox and production.

Expected latency

Typically 500–2000 ms depending on scope and report complexity. Larger date ranges or many portfolios increase latency.

Example usage

Input: { "report_type": "portfolio_summary", "scope": { "portfolio_ids": ["port_abc"] }, "format": "markdown" }

Output: { "report": "# Portfolio Summary\n\n...", "generated_at": "2026-03-13T12:00:00Z", "data_sources": ["port_abc", "pos_1", "pos_2"] }

Common failure modes

  • 403 Forbidden: Missing read scopes. Add required scopes.
  • 404 Not Found: Portfolio or participant in scope not found. Verify IDs.
  • Timeout: Large scope. Narrow date range or portfolio set.

Audit records emitted

DMTR API reads are logged. Report generation may emit report.generated for compliance (if configured).

Edit this page on GitHub

Last reviewed: March 13, 2026

Was this page helpful?