pi-mcp-adapter 2.2.0 → 2.2.1
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.
- package/CHANGELOG.md +5 -0
- package/index.ts +3 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.2.1] - 2026-03-23
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- Added `promptSnippet` to MCP proxy tool and direct MCP tools so they appear in the system prompt's Available tools section (required since pi 0.59.0)
|
|
14
|
+
|
|
10
15
|
## [2.2.0] - 2026-03-16
|
|
11
16
|
|
|
12
17
|
### Added
|
package/index.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { buildProxyDescription, createDirectToolExecutor, resolveDirectTools } f
|
|
|
7
7
|
import { flushMetadataCache, initializeMcp, updateStatusBar } from "./init.js";
|
|
8
8
|
import { loadMetadataCache } from "./metadata-cache.js";
|
|
9
9
|
import { executeCall, executeConnect, executeDescribe, executeList, executeSearch, executeStatus, executeUiMessages } from "./proxy-modes.js";
|
|
10
|
-
import { getConfigPathFromArgv } from "./utils.js";
|
|
10
|
+
import { getConfigPathFromArgv, truncateAtWord } from "./utils.js";
|
|
11
11
|
|
|
12
12
|
export default function mcpAdapter(pi: ExtensionAPI) {
|
|
13
13
|
let state: McpExtensionState | null = null;
|
|
@@ -33,6 +33,7 @@ export default function mcpAdapter(pi: ExtensionAPI) {
|
|
|
33
33
|
name: spec.prefixedName,
|
|
34
34
|
label: `MCP: ${spec.originalName}`,
|
|
35
35
|
description: spec.description || "(no description)",
|
|
36
|
+
promptSnippet: truncateAtWord(spec.description, 100) || `MCP tool from ${spec.serverName}`,
|
|
36
37
|
parameters: Type.Unsafe<Record<string, unknown>>(spec.inputSchema || { type: "object", properties: {} }),
|
|
37
38
|
execute: createDirectToolExecutor(() => state, () => initPromise, spec),
|
|
38
39
|
});
|
|
@@ -148,6 +149,7 @@ export default function mcpAdapter(pi: ExtensionAPI) {
|
|
|
148
149
|
name: "mcp",
|
|
149
150
|
label: "MCP",
|
|
150
151
|
description: buildProxyDescription(earlyConfig, earlyCache, directSpecs),
|
|
152
|
+
promptSnippet: "MCP gateway - connect to MCP servers and call their tools",
|
|
151
153
|
parameters: Type.Object({
|
|
152
154
|
tool: Type.Optional(Type.String({ description: "Tool name to call (e.g., 'xcodebuild_list_sims')" })),
|
|
153
155
|
args: Type.Optional(Type.String({ description: "Arguments as JSON string (e.g., '{\"key\": \"value\"}')" })),
|