docs(sdk): contrat d'exposition des tools MCP par les plugins — #293 (manifest: section MCP Servers And Agent Tools — contributes.mcpServers est le seul canal IdeA-native, aucun registerMcpTool/registerServer dans activate(ctx), règles id/displayName/transport stdio/autoStart requis pour la réconciliation MCP/command relatif résolu sous pluginRoot vs absolu refusé sans allowAbsoluteCommand/cwd défaut ${pluginRoot}, assignation par triplet pluginId/serverId/toolName devant matcher tools/list du serveur, example manifest aligné contributes.skills, guidance script packagé exécutable vs lancement via binaire hôte; activation-context: activate n'expose pas d'API d'enregistrement de tools MCP — ils viennent du process serveur stdio externe et de sa réponse tools/list, ctx.pluginRoot officialisé vs import.meta.url; project-plugin-assignments: assignation résolue vers serveurs manifestés autoStart uniquement, flow skill → serveur MCP → tools assignés sans chemins relatifs depuis le Markdown servi par idea_skill_read; QA verte reconfirmée par Git: npm run check — build, typecheck:examples, package:hello-plugin)
This commit is contained in:
@ -69,6 +69,12 @@ An agent MCP tool reference contains:
|
||||
- `toolName`: the exact tool name advertised by that MCP server. The UI accepts
|
||||
this name as text because a dynamic MCP tool catalogue is not yet available.
|
||||
|
||||
IdeA resolves plugin MCP assignments to manifest-declared servers, not to
|
||||
in-process handlers registered from `activate(ctx)`. A tool assignment is useful
|
||||
only when the plugin is enabled, runtime-active, the referenced MCP server has
|
||||
`autoStart: true`, and the server process advertises the named tool through MCP
|
||||
`tools/list`.
|
||||
|
||||
Missing `plugins`, `agents`, `skills`, or `tools` arrays default to empty arrays
|
||||
when IdeA reads the document. Prefer writing them explicitly for clarity and
|
||||
forward-compatible review.
|
||||
@ -152,3 +158,10 @@ These actions solve different problems:
|
||||
When both package content and assignments changed, reload the plugin first,
|
||||
confirm it is enabled for the project, update the assignments, then relaunch the
|
||||
agent.
|
||||
|
||||
If a plugin skill describes a workflow backed by packaged scripts, prefer this
|
||||
flow: ship the scripts in the plugin package, expose them through a
|
||||
manifest-declared MCP server, assign the specific MCP tools to the target agent,
|
||||
and have the skill instruct the agent to call those tools. Avoid relative paths
|
||||
from the skill Markdown to packaged scripts; the Markdown served by
|
||||
`idea_skill_read` is content, not a stable filesystem anchor.
|
||||
|
||||
Reference in New Issue
Block a user