Skip to content

MCP serve: opt-in toolsets (leases, experiments, analytics) off the default surface - #7175

Merged
orbit-agent-01 merged 1 commit into
agent-mainfrom
orbit/ORB-20234-8fed20c3
Oct 30, 2026
Merged

orbit-agent-01 merged 1 commit into
agent-mainfrom
orbit/ORB-20234-8fed20c3

Conversation

@orbit-agent-01

Copy link
Copy Markdown
Contributor

Task

ORB-20234 — MCP serve: opt-in toolsets (leases, experiments, analytics) off the default surface

Description

Why

orbit mcp serve exposes 67 tools by default, and every one costs context in each agent session; providers without deferred tool loading pay for all the schemas up front. Several groups are operator or occasional surfaces.

Daniel (2026-10-30): "I think leases can be an opt-in, i.e. "orbit mcp serve --lease". and "Agents & crews" tools aren't needed". On experiments, he asked whether they should be an opt-in flag or a plugin. Agreed: a flag, not a plugin. Experiment assignment runs in core admission and crew routing, writes task fields, and has a dashboard view. The plugin protocol is outside the compat window and cannot own admission.

Daniel also approved (2026-10-30) a decision-channel toolset for decision_submit and decision_digest. Both refuse any agent session; only the bound channel plugin (through its callback session) or the operator may call them. Agents keep decision_list and decision_show.

Design

Use one registry-derived mechanism instead of a flag per feature:

  • orbit mcp serve --toolset <a,b,...>, also settable from config.
  • Each tool's toolset comes from its noun in the tool registry, or from its authority class where one noun spans two toolsets, as with decisions. New surfaces join a toolset rather than add a flag.

Default surface: tasks, workflows/runs/pipeline/agent_invoke, automation (auto-task, routine), decision_list/decision_show, codebase, friction, ui/visual, search, command_exec, workspace_list.

Opt-in toolsets:

  • leases: orbit.lease.*. No shipped skill, activity or auto-task calls them today.
  • experiments: orbit.experiment.*.
  • analytics: orbit.agents.*, orbit.orchestrator.show, orbit.orchestrator.scorecard, orbit.crew.ladder. These leave the default; the CLI keeps them.
  • decision-channel: orbit.decision.submit, orbit.decision.digest. A plugin's callback session keeps reaching them regardless of the serve toolset. Check how the decision-channel plugin (ws_orbit-decision-mail) connects before filtering, so channel delivery does not break.

Constraints:

  • The tools stay registered. Only the mcp serve listing and dispatch are filtered. Activity tool baselines, required_tools and plugin callback sessions must keep working. Example: crew-ladder-review (crates/orbit-core/assets/auto_tasks/crew-ladder-review.yaml) requires orbit.crew.ladder, orbit.experiment.list and orbit.experiment.readout. Confirm the activity path does not depend on the serve surface before filtering.
  • Compat (30-day MCP window): a long-lived client calling a tool that is now hidden gets a structured refusal naming the toolset and how to enable it, never "unknown tool". Federated mode applies the same toolset to every remote row.
  • Keep it generic: no per-tool special cases in serve. Update help/goldens (mcp_tools_list, tool_list), the orbit skill's references/tool-surface.md (plus the plugin/skills sync), CLI docs and the QA inventory.

Acceptance Criteria

  • orbit mcp serve with no toolset flag lists none of the lease, experiment, agents, orchestrator-scorecard/show, crew-ladder, decision-submit or decision-digest tools, and still lists decision list/show; the regenerated mcp_tools_list golden reflects the drop.
  • --toolset leases,experiments,analytics,decision-channel (and the config equivalent) restores exactly those groups; membership is derived from the tool registry, with no per-tool list in serve code.
  • Calling a hidden tool over MCP returns a structured refusal naming its toolset and the enable flag, in both workspace-bound and federated modes.
  • Activity and auto-task execution that declares these tools in required_tools (crew-ladder-review), and a decision-channel plugin's callback session, still resolve and run them, shown by an existing test or an isolated manual run.
  • CLI commands for the hidden tools are unchanged; tool-surface.md, CLI docs and goldens describe the toolsets.

Execution Summary

Click to expand

MCP serve now has opt-in toolsets. Default surface: 26 canonical tools (was 42). Opt-in: leases (8 lease tools), experiments, analytics (agents scorecard/show, orchestrator scorecard/show, crew ladder), decision-channel (decision submit/digest; decision list/show stay default).

Design: McpToolset/McpToolsetSelection in orbit-types; McpToolRules.toolset (serde default, not advertised). The registry assigns a toolset per noun at registration (register_noun_in_toolset); host-routed callback tools (decision submit/digest) map to decision-channel. orbit_mcp::with_mcp_toolsets wraps any McpHost: it filters list and dynamic definitions and refuses withheld calls with toolset_not_enabled {tool, toolset, enable:{flag, config_key}}. It wraps workspace-bound serve/listen (compose_server) and the federated mux, which filters remote rows through its canonical definitions. Selection: --toolset on serve/listen, else global config machine.mcp.toolsets (array, validated), else default; all enables every toolset. --mode remote forwards the resolved selection as --toolset to the destination. An Orbit SSH route (--remote-caller-machine-id without --toolset) serves all toolsets because its caller filters, so mux, worker and drain routes and old/new mixes keep working. orbit tool list/show JSON gained mcp_toolset.

Acceptance criteria:

  1. Met. Default serve omits lease, experiment, agents, orchestrator, crew-ladder and decision submit/digest tools and keeps decision list/show. mcp_tools_list.json regenerated (only deletions, 42 to 26). Test opt_in_toolsets_are_withheld_by_default_and_restored_by_flag_or_config; manual QA in .orbit/tmp/mcp-qa.log.
  2. Met. --toolset leases,experiments,analytics,decision-channel and config machine.mcp.toolsets restore exactly those groups (same test; config ["leases"] restores only lease tools). Membership comes from registry registration; serve code names no tool.
  3. Met. A hidden-tool call returns structured toolset_not_enabled naming the toolset and the --toolset flag, in bound and federated sessions (test plus manual QA).
  4. Met. Toolsets filter only the MCP server surface; registry, orbit tool run, task grants and required_tools are unchanged. Evidence: decision_channel_sandbox (a confined plugin runs digest and submit callbacks end to end) passed in the orbit-cli tool binary; orbit-core auto_task_required_tools and granted_tools passed; isolated manual run in which orbit.task.add with required_tools [orbit.crew.ladder, orbit.experiment.list, orbit.experiment.readout] (crew-ladder-review's set) was accepted, the negative control was refused unregistered, and orbit tool run orbit.crew.ladder / orbit.experiment.list answered.
  5. Met. No CLI command changed (only the new --toolset flag on mcp serve/listen). Docs: skill tool-surface.md (MCP toolsets section, lease/decision/scorecard notes; plugin copy synced), website how-to/mcp-integration (Toolsets section), reference/cli and reference/config, QA docs mcp-tool-evidence and cli-command-evidence. Goldens: mcp_tools_list, tool_list.json (mcp_toolset), config_show_effective, help mcp/listen.

Validation:

  • passed: UPDATE=1 make goldens, then make goldens; make ci-guards (after QA inventory update); cargo fmt --all -- --check; rustfmt --check --edition 2024 on changed test files; scripts/generate-doc-indexes.sh --check; git diff --check.
  • passed: for orbit-types, orbit-tools, orbit-mcp, orbit-config, orbit-core and orbit-cli: clippy lib/bins (-D warnings -D disallowed_methods; orbit-cli --bins), clippy --all-targets, RUSTDOCFLAGS=-D warnings cargo doc. orbit-cli first failed too_many_arguments on serve_mcp_stdio; fixed by grouping internal_drain/worker_host into StdioLaunch, then rerun passed.
  • passed tests: cargo test -p orbit-types (89), orbit-tools (102), orbit-mcp (48), orbit-config (102); orbit-cli --test mcp (83), --test tool (90), --test workspace (98), --test process mcp_listen; orbit-core --test auto_task_required_tools (5), --test runtime granted_tools/decision_channel/lease_operations.
  • not_run (pipeline final validation): task.final_validation_commands.
  • Regression mark keys_tail.rs: covered by the new config-path assertion in the opt-in test plus orbit-config tests and the config_show_effective golden.

Reconciliation: existing tests that assumed the full surface now opt in explicitly (agents_show over MCP uses --toolset analytics; error-path operator session uses --toolset decision-channel; governed_session_admission sets machine.mcp.toolsets = ["all"]). scripts/qa-full-sweep-inventory.json drops the 16 mcp: claims for opt-in tools (each scenario keeps its cli: surface) and updates the reviewed mcp digest. Scratch (QA store, ssh stub, logs) stays under ignored .orbit/tmp. Every tracked change is deliverable.

Risks and deviations:

  • MCP clients that relied on lease, experiment, analytics or decision submit/digest tools from a bare orbit mcp serve must add --toolset or machine.mcp.toolsets. RELEASING.md does not list removing a tool from the default MCP listing as breaking, so the breaking-change tag is not set; the reviewer or Daniel should confirm.
  • Activities are not auto-widened from their tool allowlist. Activity agents reach tools through orbit tool run, which is unfiltered.
  • The toolset_not_enabled refusal comes from the wrapper and is not audited as a denied call.
  • --mode remote forwards --toolset, so the destination must run a build that has the flag. An older destination refuses the unknown flag.
  • An unreadable host config makes serve warn and fall back to the default toolset.

Validation

  • Not reported

Branch Freshness

  • Base ref: origin/agent-main
  • Head ref: orbit/ORB-20234-8fed20c3
  • Behind base: 0
  • Ahead of base: 1

… t… [ORB-20234]

MCP serve: opt-in toolsets (leases, experiments, analytics) off the default surface

Planned-By: claude-opus-5-5
@orbit-agent-01 orbit-agent-01 added the orbit orbit related label Oct 30, 2026
@orbit-agent-01
orbit-agent-01 merged commit 8127bfd into agent-main Oct 30, 2026
11 checks passed
@orbit-agent-01
orbit-agent-01 deleted the orbit/ORB-20234-8fed20c3 branch October 30, 2026 22:21
danieljhkim added a commit that referenced this pull request Nov 6, 2026
…RB-22211] (#8163)

* fix: Keep CI sweeps working when compiler repair tasks are claimed [ORB-22211]

* fix: task.show delivery field fails for never-delivered tasks [ORB-22214] (#8184)

Co-authored-by: orbit[muse-spark-1.3-contributor] <[email protected]>

* chore: [auto-task] Design sync — reconcile design docs with task state … [ORB-22266] (#8185)

[auto-task] Design sync — reconcile design docs with task state and code

Co-authored-by: orbit[gpt-6-luna] <[email protected]>

* chore: [auto-task] Validate the oldest workspace documentation [ORB-22269] (#8187)

Co-authored-by: orbit[claude-haiku-5-5] <[email protected]>

* fix: [code-review] Make the MCP selector audit cover every opt-in tools… [ORB-22280] (#8188)

[code-review] Make the MCP selector audit cover every opt-in toolset

Fixes: 8127bfd ("feat: MCP serve: opt-in toolsets (leases, experiments, analytics) off t… [ORB-20234] (#7175)")
Regression-From: ORB-20234
Regression: broke_existing; escape=no_test; severity=low

Co-authored-by: orbit[muse-spark-1.3-contributor] <[email protected]>

* fix: [qa-sweep] task lint sweep tells the operator to re-run --restore-… [ORB-22281] (#8189)

[qa-sweep] task lint sweep tells the operator to re-run --restore-pruned when nothing is restorable

Fixes: fbeb4b1 ("feat: [distributed-drain v1] Preserve declared missing-file context thr… [ORB-12490] (#2274)")
Regression-From: ORB-12490
Regression: defect_in_new; escape=no_test; severity=low

Co-authored-by: orbit[gpt-6-luna] <[email protected]>

* refactor: Remove two unused orbit-core convenience methods [ORB-22286] (#8190)

Co-authored-by: orbit[claude-haiku-5-5] <[email protected]>

* fix: Fix flaky test: concurrent_mutations_apply_once_while_a_live_serve… [ORB-22285] (#8191)

Fix flaky test: concurrent_mutations_apply_once_while_a_live_server_refuses_preflight (1 flakes in 14 days)

Co-authored-by: orbit[gpt-6.1-terra] <[email protected]>

* refactor: Move ApplicationPort's implementation from runtime to composi… [ORB-22288] (#8193)

Move ApplicationPort's implementation from runtime to composition

Co-authored-by: orbit[gpt-6.1-terra] <[email protected]>

* docs: refresh the README GIF and site hero video from the current dashboard [ORB-22282] (#8194)

New tour built with HyperFrames from the live ws_orbit dashboard, captured
2026-11-06: queue, auto-drain, task record, a pull-request run, auto-tasks,
metrics, experiments, crew ranking and the codebase view.

The site's video and poster move to orbit-dashboard-tour-v4 to match their
source set in the marketing repo and so a cached v3 cannot be served. The
README alt text, the video's aria-label and caption, and the DESIGN.md source
pointer now describe the new cut.

Co-authored-by: Claude Opus 5.5 <[email protected]>

* fix: orbit-core lib.rs crate docs still say the runtime module implemen… [ORB-22296] (#8195)

orbit-core lib.rs crate docs still say the runtime module implements the application port

Fixes: aa01cbe ("refactor: Move ApplicationPort's implementation from runtime to composi… [ORB-22288] (#8193)")
Regression-From: ORB-22288
Regression: unclassified; escape=no_test; severity=low

Co-authored-by: orbit[gpt-6-luna] <[email protected]>

* chore: [auto-task] Validate the oldest workspace documentation [ORB-22294] (#8196)

Co-authored-by: orbit[gpt-6-luna] <[email protected]>

---------

Co-authored-by: orbit[claude-opus-5-5] <[email protected]>
Co-authored-by: Daniel <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: danieljhkim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

orbit orbit related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant