Skip to content

feat(vmcp): add configurable tool search and generic invocation - #8144

Open
calvinmclean wants to merge 11 commits into
obot-platform:mainfrom
calvinmclean:feat/8065-toolsearch
Open

calvinmclean wants to merge 11 commits into
obot-platform:mainfrom
calvinmclean:feat/8065-toolsearch

Conversation

@calvinmclean

@calvinmclean calvinmclean commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add a vMCP Tool search setting that exposes search_tools and call_tool in place of direct component tools when enabled.
  • Carry the setting through API types, validation, runtime configuration, the vMCP editor, and GitOps documentation.
  • Let the MCP inspector edit arbitrary object arguments for generic tool calls, with a simpler labeled field.

addresses #8065

Comment thread go.mod Outdated
sigs.k8s.io/structured-merge-diff/v6 v6.4.1 // indirect
)

replace github.com/obot-platform/mmmcp => github.com/calvinmclean/mmmcp v0.0.0-20261005220025-2e7920dd13d5

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This will be removed when obot-platform/mmmcp#19 is merged

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.

Copilot review overview

🟡 Changes recommended

Generic invocation bypasses tool-specific filters and loses audit identity, while JSON editing can alter or misrepresent submitted arguments.

Review effort: Balanced
Findings: 1 High severity · 3 Medium severity

Open (4)
What changed in this PR

Adds configurable tool search and generic invocation to Obot’s vMCPs, addressing #8065.

Changes:

  • Carries toolSearch through API schemas, runtime configuration, and the vMCP editor.
  • Adds freeform JSON argument editing to the MCP inspector.
  • Adds tests, documentation, and search dependencies.
File Description
ui/​user/​src/​lib/​services/​vmcps/​utils.ts Initializes and preserves tool-search settings.
ui/​user/​src/​lib/​services/​user/​types.ts Adds the manifest setting.
ui/​user/​src/​lib/​components/​vmcps/​VMcpToolSearch.svelte.spec.ts Tests creation, editing, and read-only behavior.
ui/​user/​src/​lib/​components/​vmcps/​CreateEditVMcp.svelte Adds the tool-search toggle.
ui/​user/​src/​lib/​components/​mcp/​tester/​JsonSchemaGenericObject.svelte.spec.ts Tests freeform object arguments.
ui/​user/​src/​lib/​components/​mcp/​tester/​JsonSchemaField.svelte Adds a JSON object editor.
pkg/​storage/​openapi/​generated/​openapi_generated.go Updates generated schemas.
pkg/​mcpcatalog/​validation_test.go Tests manifest decoding.
pkg/​mcp/​vmcp.go Passes the setting into runtime configuration.
pkg/​mcp/​vmcp_test.go Tests configuration propagation.
pkg/​mcp/​types.go Adds the runtime setting.
pkg/​mcp/​backend.go Enables MMMCP tool search.
pkg/​api/​handlers/​mcpgateway/​handler_test.go Tests embedded search and generic invocation.
go.sum Updates dependency checksums.
go.mod Selects the MMMCP fork and search dependencies.
docs/​docs/​functionality/​virtual-mcps.md Explains search mode.
docs/​docs/​configuration/​mcp-server-gitops.md Shows GitOps configuration.
apiclient/​types/​vmcp.go Adds the API manifest field.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pkg/mcp/backend.go
Comment thread ui/user/src/lib/components/mcp/tester/JsonSchemaField.svelte
Comment thread ui/user/src/lib/components/mcp/tester/JsonSchemaField.svelte Outdated
Comment thread ui/user/src/lib/components/mcp/tester/JsonSchemaField.svelte
@calvinmclean
calvinmclean marked this pull request as ready for review October 6, 2026 18:23
@calvinmclean
calvinmclean requested a review from a team as a code owner October 6, 2026 18:23
Copilot AI balanced review requested due to automatic review settings October 6, 2026 18:23

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.

Comment thread pkg/api/handlers/mcpgateway/generic_tool_call.go
Comment thread pkg/api/handlers/mcpgateway/generic_tool_call.go Outdated
Comment thread pkg/api/handlers/mcpgateway/handler.go
Return completed MMMCP tool error results for stale generic references so clients can search again. Inspect generic calls only when hooks or auditing need resolution, preserving large passthrough requests.
Record request and response audit entries when generic tool resolution returns a tool error or discovery failure. Return written response details to the audit path without a response recorder.
Drop checksums for the replaced upstream MMMCP module after resolving the rebase conflict.
Copilot AI balanced review requested due to automatic review settings October 6, 2026 22:27

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.

Copilot review overview

🟡 Changes recommended

Replica-local catalog staleness can reject valid calls, and compressed-request resolution failures lose correlated JSON-RPC errors.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity

Open (2)
Resolved since last review (3)

headers.Set("Authorization", "Bearer "+token)
}
ctx := component.ContextWithRequestHeaders(req.Context(), headers)
call, ok, err := h.composite.ResolveToolCall(ctx, cfg, params.Name, params.Arguments)
if authErr, ok := errors.AsType[*mmmcp.AuthorizationError](callErr); ok && authErr.StatusCode == http.StatusUnauthorized {
return http.StatusUnauthorized, writeMCPAuthRequired(req, false), true
}
response, ok := mcpJSONRPCErrorResponse(req.Request, callErr)
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