Skip to content

Phase 3 — The data-model guide - #4140

Open
gilgardosh wants to merge 1 commit into
mcp-enhancements-pahse2from
mcp-enhancements-pahse3
Open

Phase 3 — The data-model guide#4140
gilgardosh wants to merge 1 commit into
mcp-enhancements-pahse2from
mcp-enhancements-pahse3

Conversation

@gilgardosh

Copy link
Copy Markdown
Collaborator

No description provided.

@gilgardosh
gilgardosh requested a lite review from Copilot August 5, 2026 12:56
@gilgardosh gilgardosh self-assigned this Aug 5, 2026
@gilgardosh
gilgardosh temporarily deployed to accounter-fullstack August 5, 2026 12:56 — with GitHub Actions Inactive
@gilgardosh
gilgardosh temporarily deployed to accounter-fullstack August 5, 2026 12:56 — with GitHub Actions Inactive

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a “data-model guide” discovery tool to the MCP server so agents can read a canonical, code-checked explanation of Accounter’s accounts/charges model (and common aggregation traps) before querying and interpreting business data.

Changes:

  • Introduces accounter_data_model_guide as a pure, no-scope, read-only tool that returns a static markdown guide plus structured { guide, version }.
  • Registers the guide immediately after membership discovery so it appears early in tools/list.
  • Adds tests to prevent guide drift (tool-name references, charge/account types, prompt budget) and updates docs to reflect the new tool count and behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/mcp-server/src/tools/registry-instance.ts Registers the new guide tool early in registry order (right after memberships).
packages/mcp-server/src/tools/data-model-guide.ts Implements the static guide tool and exports guide/version constants.
packages/mcp-server/src/tools/tests/scope-forwarding.test.ts Treats the new guide as a pure tool in scope-forwarding assertions.
packages/mcp-server/src/tools/tests/data-model-guide.test.ts Adds purity + drift-prevention tests and prompt-size budget checks.
packages/mcp-server/README.md Documents the new tool and updates curated tool count.
packages/mcp-server/docs/todo.md Updates the stated curated tool count.
docs/mcp-extension/plan.md Marks Phase 3 as done and documents implementation notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +125 to +128
List responses report \`returnedCount\`, \`totalCount\` and \`truncated\`, and echo the effective
\`scope.businessIds\`. When \`truncated\` is true you are not seeing everything — narrow the filters
rather than assuming the total. Call \`accounter_list_business_memberships\` first to learn which
businesses you can query.
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