[
https://issues.apache.org/jira/browse/KUDU-3806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18137972#comment-18137972
]
ASF subversion and git services commented on KUDU-3806:
-------------------------------------------------------
Commit cc0533d6afa479948371768c33687aa9fbfb957a in kudu's branch
refs/heads/master from Marton Greber
[ https://gitbox.apache.org/repos/asf?p=kudu.git;h=cc0533d6a ]
KUDU-3806: classify CLI actions for the MCP server
The MCP server (added in a later change) exposes CLI actions as
callable tools. Whether an action may be surfaced at all -- and
whether it needs gating -- is a safety property of the action, so it
belongs next to the action definition rather than in a lookup table
the server maintains separately.
Introduce a Disposition vocabulary (SURFACE / GATED / REJECT /
EXCLUDE) plus advisory node-local / unsafe / user-data tags, and hang
them off ActionBuilder via McpDisposition() / McpNodeLocal() /
McpUnsafe() / McpUserData(). Disposition is forward-declared in
tool_action.h with a fixed underlying type so the CLI framework
carries the classification without depending on the MCP feature. The
user-data tag marks actions that return row-level data (table scan,
WAL and rowset dumps, ...) so that the server can gate them
separately from metadata reads.
mcp_disposition.{h,cc} own the enum, the command-path helper, a
VisitActions() walker over the action tree, and
ValidateDispositionCoverage[OrDie](), which fails loudly if any
action is unclassified. There is no exemption: the actions of the
test-only 'test' mode are explicitly classified EXCLUDE. A companion
test asserts coverage against the current tree, so a new action that
is never classified fails the test rather than silently becoming
non-surfaceable at runtime.
Classify every existing action across the fourteen mode families and
the test-only 'test' mode. Node-local mutations and long multi-step
jobs (e.g. 'fs check' because of --repair, 'master add') are EXCLUDE,
and long-running load generation ('perf loadgen') is REJECT. This
wires no server yet; it only tags actions and enforces that the tags
are complete.
Change-Id: I29aaf7910198c33589438638140fbb8e8cc5a695
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Reviewed-on: https://gerrit.cloudera.org/24907
Reviewed-by: Zoltan Chovan <[email protected]>
Tested-by: Marton Greber <[email protected]>
Reviewed-by: Gabriella Lotz <[email protected]>
> Kudu MCP
> --------
>
> Key: KUDU-3806
> URL: https://issues.apache.org/jira/browse/KUDU-3806
> Project: Kudu
> Issue Type: New Feature
> Reporter: Marton Greber
> Assignee: Marton Greber
> Priority: Major
>
> Introduce kudu mcp serve, an MCP server that exposes existing kudu CLI
> actions as MCP tools so operators can drive cluster diagnostics and
> administration from an MCP-capable client (e.g. an LLM agent) without
> hand-crafting command lines.
> Design highlights:
> - Safety classification. Every action in the CLI action tree resolves to
> exactly one Disposition:
> -- SURFACE — read-only, always exposed (node-local reads are surfaced but
> tagged as only meaningful on that node);
> -- GATED — cluster-mutating, hidden unless --allow-writes is set;
> -- REJECT — long-running/never-promptly-returning ops that would wedge the
> single-threaded serve loop;
> -- EXCLUDE — interactive or node-local mutating actions, never surfaced.
> - Read-only by default. Mutating tools are only advertised with
> --allow-writes.
> - Process isolation. Each tools/call runs its action in a fresh child kudu
> process bounded by --mcp_tool_timeout_sec (default 60s), so a hung action
> cannot freeze the server.
> - Credential hygiene. --master_addresses is registered once at serve time
> and injected into each call, so it never has to appear in the conversation.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)