list_app_plugins
Retrieve available plugins for a specific Webasyst application to extend its functionality and customize features.
Instructions
Получить список плагинов приложения
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_id | Yes | ID приложения |
Implementation Reference
- webasyst-mcp.js:101-113 (handler)The core handler function for the 'list_app_plugins' MCP tool. It locates the Webasyst root directory, checks for the plugins folder in the specified app, reads plugin.php configs for each plugin directory, extracts name and version, and formats a text response listing the plugins.async function listAppPluginsTool({ app_id }) { const rootPath = await findWebasystRoot(); const pluginsPath = path.join(rootPath, 'wa-apps', app_id, 'plugins'); if (!(await fileExists(pluginsPath))) return { content: [{ type: 'text', text: `У приложения ${app_id} нет плагинов` }] }; const list = []; for (const dir of await fs.readdir(pluginsPath)) { const p = path.join(pluginsPath, dir, 'lib', 'config', 'plugin.php'); if (await fileExists(p)) { const info = await readPHPConfigArray(p).catch(() => ({})); list.push({ id: dir, name: info.name || dir, version: info.version || '0.0.1' }); } } return { content: [{ type: 'text', text: `Плагины приложения ${app_id}:\n\n${list.map(pl => `- ${pl.name} (${pl.id}) - v${pl.version}`).join('\n')}` }] };
- webasyst-mcp.js:1700-1700 (registration)Registration of the 'list_app_plugins' tool in the MCP server's tools list. Defines the tool name, description, and input schema requiring 'app_id' parameter.{ name: 'list_app_plugins', description: 'Получить список плагинов приложения', inputSchema: { type: 'object', properties: { app_id: { type: 'string', description: 'ID приложения' } }, required: ['app_id'] } },
- webasyst-mcp.js:1762-1762 (registration)Dispatch in the main CallToolRequestSchema handler switch statement that routes calls to the listAppPluginsTool function.case 'list_app_plugins': return await listAppPluginsTool(args);