Файли
openidea/wit/mcp.wit
T
l0ng-ai 047cac209b feat(plugins): plugin API 1.4 (#2207)
Plugin API 1.4: grants for unencrypted HTTP, local sockets, IDE commands and owned database sources; window status items, output channels, content tabs, editor selections, decorations, search, Problems and VCS reads; runs, keyed terminals with exit events, plugin run targets, dynamic run configurations and test parsers; language features, injections, snippets and menu locations; plugin MCP tools on the built-in server; four official API examples. Released 1.3 plugins keep working.
2026-11-09 08:40:40 +08:00

17 рядки
725 B
Plaintext

package openidea:[email protected];
/// Discovery of the IDE's built-in MCP server; never exposes its URL or token.
interface mcp {
/// Stdio bridge argv for the invoking project; none without a window/project or while off.
stdio-command: func() -> option<list<string>>;
}
/// Optional tools declared by contributes.mcpTools, under the plugin's grants and command budget.
interface mcp-provider {
use types.{error};
use invocation.{invocation};
/// Calls the declared local tool name with JSON arguments and the project's window context.
/// Returns text; tools may encode structured data as JSON text.
call: func(tool: string, arguments: string, ctx: borrow<invocation>) -> result<string, error>;
}