You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(k8s): org-scoped GitHub example for MCPToolConfig\n- Rename tools per org (acme/foocorp)\n- Update filters to use overridden names\n- Add concise notes on empty filter and override filtering
:::note[Empty filter] If `toolsFilter` is omitted or empty, all tools are
40
+
allowed. :::
41
+
39
42
## Rename tools and override descriptions
40
43
41
-
You can rename tools to match your team's conventions and refine their
42
-
descriptions:
44
+
You can rename tools to clearly distinguish different deployments or scopes, and
45
+
refine their descriptions to add usage guidance.
46
+
47
+
A common pattern is running the same MCP server multiple times for different
48
+
scopes (for example, separate GitHub orgs, repos, or environments). Renaming
49
+
tools makes intent obvious and helps prevent mistakes.
43
50
44
51
```yaml title="toolconfig-with-overrides.yaml"
45
52
apiVersion: toolhive.stacklok.dev/v1alpha1
46
53
kind: MCPToolConfig
47
54
metadata:
48
55
name: github-tools-config
49
-
namespace: default
56
+
namespace: toolhive-system
50
57
spec:
58
+
# Only expose GitHub PR-related tools
51
59
toolsFilter:
52
60
- create_pull_request
53
61
- get_pull_request
54
62
- list_pull_requests
55
63
- merge_pull_request
64
+
65
+
# You can override name, description, or both (they are independent)
56
66
toolsOverride:
67
+
# Override only the name
57
68
create_pull_request:
58
69
name: github_create_pr
59
-
description: Create a new GitHub pull request
70
+
71
+
# Override only the description (keep the original name)
60
72
get_pull_request:
61
-
name: github_get_pr
62
-
description: Retrieve details of a GitHub pull request
73
+
description: Retrieve details of a specific GitHub pull request
74
+
75
+
# Override both name and description
63
76
list_pull_requests:
64
77
name: github_list_prs
65
78
description: List pull requests in a repository
79
+
66
80
merge_pull_request:
67
81
name: github_merge_pr
68
82
description: Merge a GitHub pull request
69
83
```
70
84
71
-
The key in the `toolsOverride` object is the _original tool name_, while the
72
-
`name`field contains the _new name_ that clients will see.
85
+
The key in the `toolsOverride` map is the original tool name; the `name` field is the user-visible (overridden) name.
86
+
87
+
:::info[Override fields]
88
+
You can override name or description independently. Leave one unset to keep the original value from the MCP server. Both fields cannot be empty at the same time.
89
+
:::
90
+
91
+
:::tip[When to rename?]
92
+
If you run the same server for different scopes (for example, prod vs. sandbox), use distinct tool names like `github_prod_create_pr` and `github_sandbox_create_pr` to make intent clear to clients.
93
+
:::
73
94
74
95
## Reference the configuration from an MCP server
75
96
76
-
Add toolConfigRef to your MCPServer. toolConfigRef overrides spec.tools
77
-
(deprecated).
97
+
Add `toolConfigRef` to your `MCPServer`. `toolConfigRef` takes precedence over
0 commit comments