Skip to content

Declarative tools, tool groups, read-only mode, output schemas - #5

Merged
Tom-R-Main merged 3 commits into
mainfrom
improve/tool-registry
Sep 24, 2026
Merged

Tom-R-Main merged 3 commits into
mainfrom
improve/tool-registry

Conversation

@Tom-R-Main

Copy link
Copy Markdown
Owner

Stacked on #4.

1. Declarative single-request tools (1d343ac)

  • 90 hand-written tools now use registerObsRequestTool. The tool contract snapshot, which covers names, titles, input schemas and hints, is identical before and after.
  • Net change is about −2,100 lines.
  • 34 tools with real custom behaviour stay hand-written: start/confirm, screenshots, sleep, argument transforms, and similar.
  • Output changes: read-only getters that turned the response into prose, like obs-get-current-scene ("Current scene: X") and obs-get-input-mute, now return the OBS JSON. Error text is now <Title> failed: <reason>.

2. Tool groups and read-only mode (e36992d)

  • New settings:
    • OBS_MCP_TOOLSETS: all, core, or any of 14 groups
    • OBS_MCP_TOOLS: extra tool names
    • OBS_MCP_READ_ONLY: overrides both lists
  • Leaving them unset registers all 156 tools, as before. core registers 79; core plus read-only registers 38.
  • Unknown group or tool names stop the server at startup.
  • The .mcpb manifest exposes the groups and read-only mode as user settings.

3. Output schemas (this PR's last commit)

  • Single-request tools declare an outputSchema generated from docs/protocol.json, and return structuredContent directly.
  • Fields are optional and nullable. The live test found GetSpecialInputs returning undocumented nulls on OBS 32.2.2, and older OBS versions omit newer fields.

Tests

  • Unit: filter rules, group coverage, read-only precedence, and unknown names.
  • Output formats: every tool that declares one is called against protocol-shaped fake responses.
  • End-to-end: core + read-only through the built server, and refusal to start on bad names.
  • Live: every argument-free read-only tool is called against real OBS and must match its format.

Results:

  • npm run check: 71 unit, 10 e2e, manifest
  • npm run test:package passes
  • Live read-only suite: 3 passed, 2 skipped by design

Groups use GitHub's github-mcp-server pattern (--toolsets, --read-only).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Vjn8uBEa4mJshaQU3pFuqX

Tom-R-Main and others added 3 commits September 22, 2026 17:50
90 tools that send one OBS request and either print its JSON or a fixed
confirmation now use registerObsRequestTool, with an optional successMessage
built from the arguments. Names, titles, input schemas, and annotations are
unchanged (the tool contract snapshot is identical).

Read-only getters that formatted the response as prose, such as
obs-get-current-scene and obs-get-input-mute, now return the OBS response as
JSON so structuredContent carries the real fields. Error text is now
'<Title> failed: <reason>'. 34 tools with custom behavior stay hand-written.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vjn8uBEa4mJshaQU3pFuqX
OBS_MCP_TOOLSETS (all, core, or group names), OBS_MCP_TOOLS (extra tool
names), and OBS_MCP_READ_ONLY choose which tools are registered; read-only mode
overrides both lists. Unset, every tool is registered as before. Unknown group
or tool names stop the server at startup. The .mcpb manifest exposes the group
list and read-only switch as user settings.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vjn8uBEa4mJshaQU3pFuqX
registerObsRequestTool tools now declare outputSchema: the request's response
fields from docs/protocol.json, or { message } for confirmation tools, and
return matching structuredContent directly instead of re-parsing their text.
Fields are optional and nullable: live OBS 32.2.2 returns undocumented nulls
(GetSpecialInputs) and older versions omit newer fields.

A unit test calls every schema-declaring tool against protocol-shaped fake
responses; a live test calls every argument-free read-only tool against real
OBS and fails on any output validation error.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vjn8uBEa4mJshaQU3pFuqX
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 22, 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 ✅ Completed 2026-09-22T21:56:46.116230Z d9a91be PR opened
ℹ️ 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.

@Tom-R-Main
Tom-R-Main changed the base branch from improve/preflight to main September 24, 2026 05:11
@Tom-R-Main
Tom-R-Main merged commit 1f5f655 into main Sep 24, 2026
4 checks passed
@Tom-R-Main
Tom-R-Main deleted the improve/tool-registry branch September 24, 2026 05:13
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.

1 participant