Skip to content

feat(mcp): add write tools for accounts, assets, and transactions - #259

Merged
asiniscalchi merged 3 commits into
mainfrom
feat/mcp-write-tools
Aug 27, 2026
Merged

feat(mcp): add write tools for accounts, assets, and transactions#259
asiniscalchi merged 3 commits into
mainfrom
feat/mcp-write-tools

Conversation

@a-mandala

Copy link
Copy Markdown
Collaborator

Summary

  • Extends the portfolio MCP server with 9 write tools alongside the existing read-only ones
  • All write tools reuse the existing storage layer, so validation (negative positions, OPENING constraints, referential integrity) matches GraphQL mutations exactly

New tools

Tool Purpose
create_account / delete_account account management
create_asset / delete_asset tracked-asset management
create_transaction record BUY/SELL/OPENING
update_transaction full replace of an existing transaction
delete_transaction remove a transaction
create_transfer cash between accounts, optional FX conversion
create_cash_movement deposit/withdrawal

Notes

  • Server instructions updated to advertise the new surface
  • Tool-list test extended to the full 12-tool set
  • No auth added (out of scope, per discussion) — MCP endpoint exposure unchanged

Validation

  • cargo check clean
  • cargo test: 258 passed, 0 failed (incl. updated tool-list test)
  • cargo fmt applied, cargo clippy no new warnings

Extend the portfolio MCP server with write operations alongside the
existing read-only tools:

- create_account, delete_account
- create_asset, delete_asset
- create_transaction (BUY/SELL/OPENING), update_transaction,
  delete_transaction
- create_transfer (with optional FX conversion)
- create_cash_movement (deposit/withdrawal)

Write tools reuse the existing storage layer so all validation rules
(negative positions, OPENING constraints, referential integrity)
apply identically to the GraphQL mutations. Server instructions
updated to advertise the new surface; tool-list test extended.
@asiniscalchi
asiniscalchi merged commit d9ce87e into main Aug 27, 2026
4 checks passed
@asiniscalchi
asiniscalchi deleted the feat/mcp-write-tools branch August 27, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants