Skip to content

feat: split MCP tools for Claude connector#101

Merged
freeznet merged 10 commits into
mainfrom
freeznet/tool-annotation-claude
May 20, 2026
Merged

feat: split MCP tools for Claude connector#101
freeznet merged 10 commits into
mainfrom
freeznet/tool-annotation-claude

Conversation

@freeznet
Copy link
Copy Markdown
Member

No description provided.

@freeznet freeznet self-assigned this May 19, 2026
Copilot AI review requested due to automatic review settings May 19, 2026 05:48
@freeznet freeznet requested a review from a team as a code owner May 19, 2026 05:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the StreamNative MCP Server tool surface to better match Claude connector review requirements by splitting previously mixed read/write admin tools into separate MCP tools and by consistently setting MCP tool safety annotations (read-only vs destructive), with read-only mode excluding write-capable tools.

Changes:

  • Split multiple Kafka and Pulsar admin tools into distinct *_read and *_write tools with mode-specific operation enums.
  • Introduce a shared pkg/mcp/toolannotations helper and apply annotations across static tools, builders, and dynamic Functions-as-Tools.
  • Add compliance-focused tests to ensure titles/annotations are present and write tools are excluded in --read-only, plus doc updates reflecting the new tool naming.

Reviewed changes

Copilot reviewed 68 out of 72 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
README.md Document Claude connector compatibility behavior and tool split semantics
PLAN.md Add implementation plan and compliance checklist for tool split/annotations
pkg/mcp/toolannotations/annotations.go New helper for consistent MCP tool safety annotations
pkg/mcp/streamnative_resources_tools.go Apply destructive annotation helper to SN Cloud resource tools
pkg/mcp/streamnative_resources_log_tools.go Mark SN Cloud logs tool as read-only via helper
pkg/mcp/static_tool_annotations_test.go Add tests validating StreamNative static/context tool annotations
pkg/mcp/sncontext_tools.go Add annotations + gate context-mutation tools behind read-only
pkg/mcp/pftools/manager.go Mark dynamic function tools destructive; skip registration in read-only
pkg/mcp/builders/pulsar/topic.go Split Pulsar topic tool into read/write variants with enums + annotations
pkg/mcp/builders/pulsar/topic_test.go Update tests for split topic tool + updated error text
pkg/mcp/builders/pulsar/topic_policy.go Split topic policy tool into read/write variants with enums + annotations
pkg/mcp/builders/pulsar/topic_policy_test.go Update tests for split topic policy tool + updated error text
pkg/mcp/builders/pulsar/tool_mode.go Add shared read/write mode helpers for Pulsar builders
pkg/mcp/builders/pulsar/tenant.go Split tenant tool into read/write variants with enums + annotations
pkg/mcp/builders/pulsar/subscription.go Split subscription tool into read/write variants with enums + annotations
pkg/mcp/builders/pulsar/status.go Add read-only annotation/title to status tool
pkg/mcp/builders/pulsar/sources.go Split sources tool into read/write variants with enums + annotations
pkg/mcp/builders/pulsar/sinks.go Split sinks tool into read/write variants with enums + annotations
pkg/mcp/builders/pulsar/schema.go Split schema tool into read/write variants with enums + annotations
pkg/mcp/builders/pulsar/resourcequotas.go Split resource quota tool into read/write variants with enums + annotations
pkg/mcp/builders/pulsar/produce.go Mark Pulsar produce tool destructive with title
pkg/mcp/builders/pulsar/packages.go Split packages tool into read/write variants with enums + annotations
pkg/mcp/builders/pulsar/nsisolationpolicy.go Split ns-isolation-policy tool into read/write variants with enums + annotations
pkg/mcp/builders/pulsar/namespace.go Split namespace tool into read/write variants with enums + annotations
pkg/mcp/builders/pulsar/namespace_policy.go Add annotations/titles to namespace policy get/set/remove tools
pkg/mcp/builders/pulsar/functions.go Split functions tool into read/write variants; adjust download classification
pkg/mcp/builders/pulsar/functions_worker.go Add read-only annotation/title to functions worker tool
pkg/mcp/builders/pulsar/functions_test.go Update functions builder test for read/write tool list
pkg/mcp/builders/pulsar/functions_parity_test.go Update parity expectations for download being read-mode
pkg/mcp/builders/pulsar/feature_gates_test.go Update feature-gate tests for read/write tool pairs
pkg/mcp/builders/pulsar/consume.go Mark Pulsar consume tool destructive; skip in read-only mode
pkg/mcp/builders/pulsar/cluster.go Split cluster tool into read/write variants with enums + annotations
pkg/mcp/builders/pulsar/brokers.go Split brokers tool into read/write variants with enums + annotations
pkg/mcp/builders/pulsar/brokers_stats.go Add read-only annotation/title to broker stats tool
pkg/mcp/builders/pulsar/annotation_compliance_test.go Add Pulsar-wide annotation/mode compliance tests
pkg/mcp/builders/kafka/topics.go Split Kafka topics tool into read/write variants with enums + annotations
pkg/mcp/builders/kafka/tool_mode.go Add shared read/write mode helpers for Kafka builders
pkg/mcp/builders/kafka/schema_registry.go Split schema registry tool into read/write variants with enums + annotations
pkg/mcp/builders/kafka/produce.go Mark Kafka produce tool destructive with title
pkg/mcp/builders/kafka/partitions.go Rename partitions tool to write-only; skip in read-only; annotate destructive
pkg/mcp/builders/kafka/groups.go Split Kafka groups tool into read/write variants with enums + annotations
pkg/mcp/builders/kafka/consume.go Mark Kafka consume tool destructive; skip in read-only mode
pkg/mcp/builders/kafka/connect.go Split Kafka connect tool into read/write variants with enums + annotations
pkg/mcp/builders/kafka/connect_test.go Update Kafka connect tests for split tool behavior
pkg/mcp/builders/kafka/annotation_compliance_test.go Add Kafka-wide annotation/mode compliance tests
pkg/cmd/mcp/server.go Plumb read-only flag into context tool registration
docs/tools/streamnative_cloud.md Whitespace cleanup; keep docs aligned
docs/tools/pulsar_client_produce.md Minor formatting cleanup
docs/tools/pulsar_client_consume.md Document destructive + read-only-mode exclusion
docs/tools/pulsar_admin_topics.md Note actual *_read/*_write tools for Claude safety
docs/tools/pulsar_admin_topic_policy.md Note actual *_read/*_write tools for Claude safety
docs/tools/pulsar_admin_tenants.md Note actual *_read/*_write tools for Claude safety
docs/tools/pulsar_admin_subscriptions.md Note actual *_read/*_write tools for Claude safety
docs/tools/pulsar_admin_sources.md Note actual *_read/*_write tools for Claude safety
docs/tools/pulsar_admin_sinks.md Note actual *_read/*_write tools for Claude safety
docs/tools/pulsar_admin_schemas.md Note actual *_read/*_write tools for Claude safety
docs/tools/pulsar_admin_resource_quotas.md Note actual *_read/*_write tools for Claude safety
docs/tools/pulsar_admin_packages.md Note actual *_read/*_write tools for Claude safety
docs/tools/pulsar_admin_nsisolationpolicy.md Note actual *_read/*_write tools for Claude safety
docs/tools/pulsar_admin_namespaces.md Note actual *_read/*_write tools for Claude safety
docs/tools/pulsar_admin_functions.md Note actual *_read/*_write tools for Claude safety
docs/tools/pulsar_admin_clusters.md Note actual *_read/*_write tools for Claude safety
docs/tools/pulsar_admin_brokers.md Note actual *_read/*_write tools for Claude safety
docs/tools/pulsar_admin_broker_stats.md Formatting cleanup
docs/tools/kafka_client_produce.md Minor formatting cleanup
docs/tools/kafka_client_consume.md Document destructive + read-only-mode exclusion
docs/tools/kafka_admin_topics.md Note actual *_read/*_write tools for Claude safety
docs/tools/kafka_admin_schema_registry.md Note actual *_read/*_write tools for Claude safety
docs/tools/kafka_admin_partitions.md Note write-only tool name + read-only-mode exclusion
docs/tools/kafka_admin_groups.md Note actual *_read/*_write tools for Claude safety
docs/tools/kafka_admin_connect.md Note actual *_read/*_write tools for Claude safety
docs/tools/functions_as_tools.md Document destructive + read-only-mode exclusion for dynamic tools

Comment thread pkg/mcp/toolannotations/annotations.go Outdated
Comment thread docs/tools/pulsar_admin_functions.md Outdated
Comment thread pkg/mcp/static_tool_annotations_test.go
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 194 out of 198 changed files in this pull request and generated 3 comments.

Comment thread charts/snmcp/e2e/test-tokens.env Outdated
Comment thread pkg/mcp/builders/pulsar/packages.go
Comment thread hack/common.sh Outdated
@freeznet freeznet merged commit 739d103 into main May 20, 2026
10 checks passed
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.

3 participants