Skip to content

feat(mcp): advertise each tool's family in tools/list _meta - #7154

Merged
vincentkoc merged 6 commits into
morluto:mainfrom
definitelynotchirag:feat/tool-family-meta
Nov 30, 2026
Merged

vincentkoc merged 6 commits into
morluto:mainfrom
definitelynotchirag:feat/tool-family-meta

Conversation

@definitelynotchirag

@definitelynotchirag definitelynotchirag commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #6870.

Expose each domain tool's selectable family in tools/list metadata so clients and gateways can group definitions without maintaining a name-based mapping. toolFamilyId() supplies the same canonical IDs accepted by REA_MCP_TOOL_FAMILIES and rea setup --tool-families.

Contract and implementation

toolRegistrationOptions() attaches the additive metadata at the shared registration boundary:

{"_meta":{"io.github.morluto/rea":{"family":"native"}}}

The adapter's discover_tools is a bootstrap helper without a selectable family and omits this field. Family metadata describes ownership, not current provider availability. The existing schema, tool-selection and discovery behavior is preserved.

The client-configuration guide links this contract while retaining its versioned Harness compatibility observations. The MCP contract guide documents the metadata key, vocabulary and bootstrap exception. Per-family descriptions remain an optional follow-up.

Validation

  • Current head: 8ff6c56921b3e2b1f2343a02afde2f7c39280eac, integrated with pinned main f5055cd2ed46a6d3bab28e8f90d82fd9381a5dbe.
  • Metadata tests inspect the complete catalog through the existing paginating client, using compact input schemas and both off/compact output-schema modes.
  • Deferred-server tests check recorded metadata before runtime loading, after discovery of a cold tool, and after materialization. They also check the bootstrap helper's omitted family metadata.
  • Local formatting and final diff checks passed. Exact-head hosted CI passed: all 12 test shards, source tests, static/architecture checks, generated catalogs, documentation, package builds, SQLite compatibility and web-network checks.
  • Public stdio checks against CI runtime artifact 15375076963 passed on Node 24.22.1/macOS arm64. Both output-schema modes advertised all 274 domain tools with the expected 19-family mapping; definitions and metadata were identical before and after binary_session loaded the runtime. Both servers exited cleanly. No native analysis provider was started.
  • Canonical P2 review found no actionable issues. No new live Harness, model-token, latency or memory measurement is claimed.

Author readiness

Human owner: @definitelynotchirag

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@greptile-apps

greptile-apps Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; no blocking issue was found.RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The PR appears safe to merge; no blocking issue was found.

Summary

Adds each domain tool’s selectable family to _meta through the shared registration helper.

  • Each REA tool listing now carries its selectable family.

Review was source-only; tests were not run. Live PR supersession status could not be verified because GitHub access was unavailable.

Reviews (6) · Last reviewed commit: "fix(mcp): align tool-family metadata wit..." · Reviewed by Greptile

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-25T18:09:00.307961Z
We couldn’t complete this review. Comment @codex review to try again.
c4772a5 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@morluto

morluto commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Thanks for the discovery-metadata proposal. Since this PR was opened, #7228 landed a contract-owned toolFamilyId inventory used for selection and catalog identity. This branch advertises contract.kind as family, which is the adapter surface and can differ from the new selectable family ID (for example native-provider versus native). Could you refresh the proposal against that owner and clarify which stable vocabulary clients should receive? The per-tool metadata remains distinct work, and the PR stays open.

Clients that index a large catalog lazily had to guess each REA tool's
group from its name. Every tools/list entry now carries the contract's
adapter family under the vendor-prefixed _meta key
"io.github.morluto/rea", attached once at the contract-to-registration
boundary. The recorded catalog replays it unchanged on the deferred path.

No tool is hidden or renamed and input schemas are unchanged.

Closes morluto#6870
Since morluto#7228 the contract-owned family inventory gives every tool one
selectable id, the vocabulary REA_MCP_TOOL_FAMILIES accepts. Advertise
that id instead of the adapter kind so clients can map an advertised tool
back to the scope that enables it.
Comment thread src/server/toolRegistrationOptions.ts Resolved
Comment thread docs/mcp-contracts.md Resolved
@definitelynotchirag

Copy link
Copy Markdown
Contributor Author

Thanks for the pointer @morluto I missed #7228. Switched the branch over to the new family ids, so a tool now says native rather than native-provider. Went with those because they're the same names people put in REA_MCP_TOOL_FAMILIES, which means a client can read the field and know exactly which scope turns that tool on. Rebased on main and updated the PR body.

Renamed test fixtures have no published family; advertise nothing for
them instead of throwing. Drop the docs claim that a family move changes
the catalog digest, since the digest hashes the adapter kind.
@morluto

morluto commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Hey @definitelynotchirag, thanks for putting this together, the addition looks useful. What's left: it has merge conflicts with main in src/server/toolRegistrationOptions.ts (merging main into the branch is fine). Once that's done I'm happy to merge it.

Comment thread docs/mcp-contracts.md Resolved
@definitelynotchirag

Copy link
Copy Markdown
Contributor Author

Merged main in, conflict resolved @morluto :)

@morluto morluto added the enhancement New feature or request label Nov 23, 2026
@vincentkoc
vincentkoc merged commit d840860 into morluto:main Nov 30, 2026
60 of 61 checks passed
@vincentkoc

Copy link
Copy Markdown
Collaborator

Thanks for this! Merged after the canonical review, green CI, and public MCP checks across all 274 tools.

vincentkoc added a commit to Afloat16/rea that referenced this pull request Nov 30, 2026
…4075-env-argv0

* commit 'aeea7c25ede5c5e6b16198e60c0eb0475ff6f5d8': (738 commits)
  fix(hopper): clarify publisher verification failures
  fix(analysis-view): keep PTX text pages on Unicode boundaries (morluto#15222)
  feat(mcp): advertise each tool's family in tools/list _meta (morluto#7154)
  perf(evidence): inspect retained records without building a bundle (morluto#15219)
  fix(process): report denied inspection as typed cleanup failures (morluto#9261)
  perf(mcp): complete retained Evidence without rebuilding bundles (morluto#15210)
  fix(agentenv): stop dry-run tarball reads on cancellation (morluto#15205)
  perf(png): reuse scanline storage in screenshot comparisons (morluto#15215)
  fix(javascript): respect Node HTTP path validation (morluto#9684)
  fix(windows): reject native addons with unusable delay-import tables (morluto#15216)
  feat(artifacts): inventory Android super image metadata (morluto#14928)
  fix(paths): reject dotted console device names for portability (morluto#15220)
  fix(analysis-view): return continuation for GPU pages at the byte limit (morluto#15206)
  fix(screenshots): report the PNG comparison memory allowance (morluto#15217)
  fix(process): compare Windows server paths by native realpath (morluto#15044)
  fix(firmware): recheck decoded member source on completion (morluto#15211)
  fix(artifacts): check signed BC4 and BC5 DDS payload extents (morluto#15208)
  fix(artifacts): bound embedded GLB images by the declared buffer length (morluto#15207)
  perf(ci): confirm test-only macOS selection on Linux (morluto#15203)
  fix(paths): reject Windows console device names (morluto#14972)
  ...
vincentkoc added a commit to 2SinceJuly/rea that referenced this pull request Nov 30, 2026
…0374-skill-guidance

* commit 'aeea7c25ede5c5e6b16198e60c0eb0475ff6f5d8': (3508 commits)
  fix(hopper): clarify publisher verification failures
  fix(analysis-view): keep PTX text pages on Unicode boundaries (morluto#15222)
  feat(mcp): advertise each tool's family in tools/list _meta (morluto#7154)
  perf(evidence): inspect retained records without building a bundle (morluto#15219)
  fix(process): report denied inspection as typed cleanup failures (morluto#9261)
  perf(mcp): complete retained Evidence without rebuilding bundles (morluto#15210)
  fix(agentenv): stop dry-run tarball reads on cancellation (morluto#15205)
  perf(png): reuse scanline storage in screenshot comparisons (morluto#15215)
  fix(javascript): respect Node HTTP path validation (morluto#9684)
  fix(windows): reject native addons with unusable delay-import tables (morluto#15216)
  feat(artifacts): inventory Android super image metadata (morluto#14928)
  fix(paths): reject dotted console device names for portability (morluto#15220)
  fix(analysis-view): return continuation for GPU pages at the byte limit (morluto#15206)
  fix(screenshots): report the PNG comparison memory allowance (morluto#15217)
  fix(process): compare Windows server paths by native realpath (morluto#15044)
  fix(firmware): recheck decoded member source on completion (morluto#15211)
  fix(artifacts): check signed BC4 and BC5 DDS payload extents (morluto#15208)
  fix(artifacts): bound embedded GLB images by the declared buffer length (morluto#15207)
  perf(ci): confirm test-only macOS selection on Linux (morluto#15203)
  fix(paths): reject Windows console device names (morluto#14972)
  ...
vincentkoc added a commit to Afloat16/rea that referenced this pull request Nov 30, 2026
…063-native-alias-cancellation

* commit 'aeea7c25ede5c5e6b16198e60c0eb0475ff6f5d8': (881 commits)
  fix(hopper): clarify publisher verification failures
  fix(analysis-view): keep PTX text pages on Unicode boundaries (morluto#15222)
  feat(mcp): advertise each tool's family in tools/list _meta (morluto#7154)
  perf(evidence): inspect retained records without building a bundle (morluto#15219)
  fix(process): report denied inspection as typed cleanup failures (morluto#9261)
  perf(mcp): complete retained Evidence without rebuilding bundles (morluto#15210)
  fix(agentenv): stop dry-run tarball reads on cancellation (morluto#15205)
  perf(png): reuse scanline storage in screenshot comparisons (morluto#15215)
  fix(javascript): respect Node HTTP path validation (morluto#9684)
  fix(windows): reject native addons with unusable delay-import tables (morluto#15216)
  feat(artifacts): inventory Android super image metadata (morluto#14928)
  fix(paths): reject dotted console device names for portability (morluto#15220)
  fix(analysis-view): return continuation for GPU pages at the byte limit (morluto#15206)
  fix(screenshots): report the PNG comparison memory allowance (morluto#15217)
  fix(process): compare Windows server paths by native realpath (morluto#15044)
  fix(firmware): recheck decoded member source on completion (morluto#15211)
  fix(artifacts): check signed BC4 and BC5 DDS payload extents (morluto#15208)
  fix(artifacts): bound embedded GLB images by the declared buffer length (morluto#15207)
  perf(ci): confirm test-only macOS selection on Linux (morluto#15203)
  fix(paths): reject Windows console device names (morluto#14972)
  ...
vincentkoc added a commit to Afloat16/rea that referenced this pull request Nov 30, 2026
…279-mcp-config-validation

* commit 'aeea7c25ede5c5e6b16198e60c0eb0475ff6f5d8': (2392 commits)
  fix(hopper): clarify publisher verification failures
  fix(analysis-view): keep PTX text pages on Unicode boundaries (morluto#15222)
  feat(mcp): advertise each tool's family in tools/list _meta (morluto#7154)
  perf(evidence): inspect retained records without building a bundle (morluto#15219)
  fix(process): report denied inspection as typed cleanup failures (morluto#9261)
  perf(mcp): complete retained Evidence without rebuilding bundles (morluto#15210)
  fix(agentenv): stop dry-run tarball reads on cancellation (morluto#15205)
  perf(png): reuse scanline storage in screenshot comparisons (morluto#15215)
  fix(javascript): respect Node HTTP path validation (morluto#9684)
  fix(windows): reject native addons with unusable delay-import tables (morluto#15216)
  feat(artifacts): inventory Android super image metadata (morluto#14928)
  fix(paths): reject dotted console device names for portability (morluto#15220)
  fix(analysis-view): return continuation for GPU pages at the byte limit (morluto#15206)
  fix(screenshots): report the PNG comparison memory allowance (morluto#15217)
  fix(process): compare Windows server paths by native realpath (morluto#15044)
  fix(firmware): recheck decoded member source on completion (morluto#15211)
  fix(artifacts): check signed BC4 and BC5 DDS payload extents (morluto#15208)
  fix(artifacts): bound embedded GLB images by the declared buffer length (morluto#15207)
  perf(ci): confirm test-only macOS selection on Linux (morluto#15203)
  fix(paths): reject Windows console device names (morluto#14972)
  ...
vincentkoc added a commit to agnaylor/rea that referenced this pull request Nov 30, 2026
…410-windows-transport

* commit '28772e67d245661b4a66ef5a09353eafda483367': (674 commits)
  docs: note symlink EPERM in Windows source test failures (morluto#7211)
  fix(javascript): scope candidate this event receivers (morluto#4656)
  fix(config): validate target and loader options before printing MCP registrations (morluto#9279)
  fix(native): honor cancellation during PE alias expansion (morluto#9063)
  fix(audit): preserve env shebang argument ownership (morluto#14075)
  feat(evtx): inventory Windows event log records offline
  docs(skill): replace the staged workflow with the rules it encodes (morluto#10374)
  fix(hopper): clarify publisher verification failures
  fix(analysis-view): keep PTX text pages on Unicode boundaries (morluto#15222)
  feat(mcp): advertise each tool's family in tools/list _meta (morluto#7154)
  perf(evidence): inspect retained records without building a bundle (morluto#15219)
  fix(process): report denied inspection as typed cleanup failures (morluto#9261)
  perf(mcp): complete retained Evidence without rebuilding bundles (morluto#15210)
  fix(agentenv): stop dry-run tarball reads on cancellation (morluto#15205)
  perf(png): reuse scanline storage in screenshot comparisons (morluto#15215)
  fix(javascript): respect Node HTTP path validation (morluto#9684)
  fix(windows): reject native addons with unusable delay-import tables (morluto#15216)
  feat(artifacts): inventory Android super image metadata (morluto#14928)
  fix(paths): reject dotted console device names for portability (morluto#15220)
  fix(analysis-view): return continuation for GPU pages at the byte limit (morluto#15206)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: mcp MCP server, transport, and tool registration enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Advertise a stable family for each tool in tools/list metadata, and document that DeepSeek Harness does not lazy-load

3 participants