Skip to content

Commit e9ab4bf

Browse files
committed
fix: address PR review comments
1 parent fdb6ccc commit e9ab4bf

3 files changed

Lines changed: 10 additions & 40 deletions

File tree

docs/tools/pulsar_admin_functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#### pulsar_admin_functions
22

3-
**Claude connector safety:** Actual MCP tools: `pulsar_admin_functions_read` (`list`, `get`, `status`, `stats`, `querystate`) and `pulsar_admin_functions_write` (`create`, `update`, `delete`, `download`, `start`, `stop`, `restart`, `putstate`, `trigger`, `upload`).
3+
**Claude connector safety:** Actual MCP tools: `pulsar_admin_functions_read` (`list`, `get`, `status`, `stats`, `querystate`, `download`) and `pulsar_admin_functions_write` (`create`, `update`, `delete`, `start`, `stop`, `restart`, `putstate`, `trigger`, `upload`).
44

55

66
Manage Apache Pulsar Functions for stream processing. Pulsar Functions are lightweight compute processes that can consume messages from one or more Pulsar topics, apply user-defined processing logic, and produce results to another topic. Functions support Java, Python, and Go runtimes, enabling complex event processing, data transformations, filtering, and integration with external systems.

pkg/mcp/static_tool_annotations_test.go

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,37 +25,21 @@ import (
2525
func TestStreamNativeStaticToolAnnotations(t *testing.T) {
2626
tools := []struct {
2727
name string
28+
tool mcpgotypes.Tool
2829
readOnly bool
2930
destructive bool
3031
}{
31-
{name: "sncloud_logs", readOnly: true},
32-
{name: "sncloud_resources_apply", destructive: true},
33-
{name: "sncloud_resources_delete", destructive: true},
34-
}
35-
36-
definitions := map[string]struct {
37-
readOnly bool
38-
destructive bool
39-
}{
40-
"sncloud_logs": {readOnly: true},
41-
"sncloud_resources_apply": {destructive: true},
42-
"sncloud_resources_delete": {destructive: true},
43-
}
44-
45-
constructed := map[string]mcpgotypes.Tool{
46-
"sncloud_logs": NewSNCloudLogsTool(),
47-
"sncloud_resources_apply": NewSNCloudResourcesApplyTool(),
48-
"sncloud_resources_delete": NewSNCloudResourcesDeleteTool(),
32+
{name: "sncloud_logs", tool: NewSNCloudLogsTool(), readOnly: true},
33+
{name: "sncloud_resources_apply", tool: NewSNCloudResourcesApplyTool(), destructive: true},
34+
{name: "sncloud_resources_delete", tool: NewSNCloudResourcesDeleteTool(), destructive: true},
4935
}
5036

5137
for _, tt := range tools {
52-
tool := constructed[tt.name]
53-
expected := definitions[tt.name]
54-
require.NotEmpty(t, tool.Annotations.Title, tt.name)
55-
require.NotNil(t, tool.Annotations.ReadOnlyHint, tt.name)
56-
require.NotNil(t, tool.Annotations.DestructiveHint, tt.name)
57-
require.Equal(t, expected.readOnly, *tool.Annotations.ReadOnlyHint, tt.name)
58-
require.Equal(t, expected.destructive, *tool.Annotations.DestructiveHint, tt.name)
38+
require.NotEmpty(t, tt.tool.Annotations.Title, tt.name)
39+
require.NotNil(t, tt.tool.Annotations.ReadOnlyHint, tt.name)
40+
require.NotNil(t, tt.tool.Annotations.DestructiveHint, tt.name)
41+
require.Equal(t, tt.readOnly, *tt.tool.Annotations.ReadOnlyHint, tt.name)
42+
require.Equal(t, tt.destructive, *tt.tool.Annotations.DestructiveHint, tt.name)
5943
}
6044
}
6145

pkg/mcp/toolannotations/annotations.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
// Copyright 2025 StreamNative
16-
//
17-
// Licensed under the Apache License, Version 2.0 (the "License");
18-
// you may not use this file except in compliance with the License.
19-
// You may obtain a copy of the License at
20-
//
21-
// http://www.apache.org/licenses/LICENSE-2.0
22-
//
23-
// Unless required by applicable law or agreed to in writing, software
24-
// distributed under the License is distributed on an "AS IS" BASIS,
25-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26-
// See the License for the specific language governing permissions and
27-
// limitations under the License.
28-
2915
// Package toolannotations provides helpers for setting MCP tool safety annotations.
3016
package toolannotations
3117

0 commit comments

Comments
 (0)