Repository navigation
Expose every remaining Party operation as an MCP tool, taking the BIAN body as request and an expected version, with HTTP parity (roadmap 1.17) - #137
Merged
Conversation
…rty Reference Data Directory Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…its request and an expected version (roadmap 1.17, group 1) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ols, with HTTP parity (roadmap 1.17, group 2) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… HTTP parity (roadmap 1.17, group 3) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ols, with the association's own version and HTTP parity (roadmap 1.17, group 4) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry BIAN field it records and HTTP parity (roadmap 1.17, group 5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ch tool's arguments by kind, and record the request and expectedVersion conventions in ADR 0040 (roadmap 1.17) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ecorded since 1.21 in its OpenAPI text (roadmap 1.17) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Roadmap phase
Phase: 1.17 MCP adapter: remaining operations
Planning package:
specs/2026-11-09-party-mcp-remaining-tools/Closes #42
Summary
Every Party Reference Data Directory operation RimBank implements is now an MCP tool as well as an HTTP endpoint, which completes Stage 1's HTTP and MCP parity (mission principle 6). The 11 operations that 1.16 left out get their tool, and the tool-list guard no longer has an allow-list.
Commands (write side), 7 new tools. Each dispatches the existing core command through
IMessageBusand answers from its acknowledgement:party_reference_data_directory_update(UpdatePartyReferenceDataDirectoryEntry)…_update_demographicsand…_exchange_demographics(UpdateDemographics,ExchangeDemographics)…_update_reference(UpdatePartyReference)…_register_associationsand…_update_associations(RegisterPartyAssociation,UpdatePartyAssociation)…_update_bank_relations(UpdateBankRelations)Queries (read side), 4 new tools.
…_retrieve_demographics,…_retrieve_referenceand…_retrieve_bank_relationsread the existing inline entry view.…_retrieve_associationsreads the existing inline association view. No read model is added or changed.Arguments (ADR 0040, amends ADR 0039 and tech-stack §6).
requestbody. A command takes its BIAN request body as onerequestobject with BIAN's property names, so it is the same JSON as HTTP. Its mirror inRimBank.Mcponly translates the JSON into the core inputs HTTP already uses. Rules and errors stay inRimBank.Core.expectedVersion. Every Update and Exchange tool requires it: MCP'sIf-Match(ADR 0027).idempotencyKeystay flat camelCase parameters. The Control Record's Register keeps its flatpartyType.Docs:
HTTP description fix. The OpenAPI description of
PUT …/Reference/{referenceid}/Updatestill said the corporate and officer references were refused "until roadmap phase 1.21". It now states the rules 1.21 shipped (ADR 0034), as the new MCP tool does. Only the text changes, not the behaviour.Definition of done
src/RimBank.Mcp/Party/PartyReferenceDataDirectory/<BQ>/, namespaceRimBank.Party.PartyReferenceDataDirectory.Mcp..Mcpstill never references.Api.docs/adr/for any significant or BIAN-interpretation decision (ADR 0040)Validation
Local, on the branch:
dotnet restore RimBank.slnx --locked-mode: OK (locked mode)dotnet build RimBank.slnx -c Release: 0 warnings, 0 errorsdotnet test --solution RimBank.slnx -c Release --no-build: 2187 passed, 0 failed, 0 skipped (after the OpenAPI text fix, Api.Tests 313 and Conformance.Tests 58 rerun green)dotnet format RimBank.slnx --verify-no-changes: exit 0From
validation.md:PartyToolCatalogTests).OperationPolicyCatalogoperations (13).idempotencyKey, Update and Exchange tools also requireexpectedVersion, a body-carrying command requiresrequest, and queries take only ids.requestschema of Reference Update is nested with BIAN names.versionequal to theETag. They also check that the errors give the same Problem Details: validation, refused BIAN part, wrong-type or unregistered reference, malformed and unknown id, and stale version. The Reference checks cover every recorded person field and every organisation-only field.VersionRoundTripTests).party.version-conflict.expectedVersionisshared.tool-arguments-invalidand stores nothing.shared.forbidden(403), and nothing is stored.validation.md. The steps are in CONTRIBUTING "MCP".Review focus
expectedVersionis a 400shared.tool-arguments-invalid, where HTTP answers 428shared.if-match-required. The SDK rejects a missing required argument before the tool runs. ADR 0040 records this as the one known HTTP/MCP difference..Mcprequest and response mirrors are copies of the.Apimodels with the namespace changed. The results addversion. It doubles the model code, as ADR 0039 chose; the parity tests are the guard. Is that guard enough, or should a shared model be revisited later?partyType(1.16), while the Associations Register takesrequest. Consistent enough?🤖 Generated with Claude Code