vcluster-yaml-mcp-server 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -3
  2. package/src/http-server.js +12 -0
package/package.json CHANGED
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "name": "vcluster-yaml-mcp-server",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "MCP server for querying vcluster YAML configurations using jq",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
7
7
  "bin": {
8
- "vcluster-yaml-mcp-server": "./src/cli.js",
9
- "vcluster-yaml-mcp": "./src/index.js",
8
+ "vcluster-yaml-mcp-server": "./src/index.js",
10
9
  "vcluster-yaml": "./src/cli.js"
11
10
  },
12
11
  "files": [
@@ -104,6 +104,7 @@ const mcpHandler = async (req, res) => {
104
104
  const jsonrpcRequest = req.body;
105
105
  const mcpMethod = jsonrpcRequest?.method || 'unknown';
106
106
  const mcpId = jsonrpcRequest?.id;
107
+ const mcpParams = jsonrpcRequest?.params;
107
108
 
108
109
  return tracer.startActiveSpan('mcp.request', async (span) => {
109
110
  try {
@@ -114,6 +115,17 @@ const mcpHandler = async (req, res) => {
114
115
  }
115
116
  span.setAttribute('http.client_ip', clientIp);
116
117
 
118
+ // Add tool-specific attributes for tools/call
119
+ if (mcpMethod === 'tools/call' && mcpParams?.name) {
120
+ span.setAttribute('mcp.tool.name', mcpParams.name);
121
+ span.updateName(`mcp.tool.${mcpParams.name}`);
122
+ }
123
+
124
+ // Add resource URI for resource operations
125
+ if ((mcpMethod === 'resources/read' || mcpMethod === 'resources/write') && mcpParams?.uri) {
126
+ span.setAttribute('mcp.resource.uri', mcpParams.uri);
127
+ }
128
+
117
129
  // Create new transport per request to prevent ID collisions
118
130
  const transport = new StreamableHTTPServerTransport({
119
131
  sessionIdGenerator: undefined,