Inspect the example
Inexamples/build-a-skill-spend-export, read:
manifest.ymlfor the skill metadata.policy-template.jsonfor the suggested policy.consent-flow.mdfor the requested access.src/skill.tsforexportLastMonthSpend.src/skill.test.tsfor the mock-client tests.
Connect the data source
exportLastMonthSpend expects its client to return an array of events containing receipts. The MCP audit.stream contract returns a stream cursor instead. Implement an adapter that obtains authorized events and supplies the shape expected by the example; the example is not a direct drop-in client for that endpoint.
The function parses receipt rows with parseSpendReceipt and returns CSV using exportCsv. It skips malformed receipts. Review skipped rows before using the output for accounting.