Skip to main content
Glama

create_shop_report

Generate Shop-Script reports for Webasyst e-commerce projects by specifying report keys, titles, and paths to automate documentation and analytics.

Instructions

Создать отчет Shop-Script

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
report_keyYes
report_titleYes
webasyst_pathYes

Implementation Reference

  • The handler function that creates a new ShopScript report PHP class file in wa-apps/shop/lib/reports/ with a basic template extending shopReports.
    async function createShopReportTool({ report_key, report_title, webasyst_path }) { const reportsDir = path.join(webasyst_path, 'wa-apps', 'shop', 'lib', 'reports'); await ensureDir(reportsDir); const file = path.join(reportsDir, `${toCamelCase(report_key)}.report.php`); const code = `<?php class shop${toCamelCase(report_key)}Report extends shopReports { public function getData(\$start, \$end) { // TODO: implement report logic return array( 'revenue' => 0, 'orders' => 0 ); } } `; await fs.writeFile(file, code); return { content: [{ type: 'text', text: `Report "${report_title}" создан: ${file}` }] }; }
  • The input schema definition for the create_shop_report tool, specifying parameters report_key, report_title, and webasyst_path.
    { name: 'create_shop_report', description: 'Создать отчет Shop-Script', inputSchema: { type: 'object', properties: { report_key: { type: 'string' }, report_title: { type: 'string' }, webasyst_path: { type: 'string' } }, required: ['report_key', 'report_title', 'webasyst_path'] } },
  • Registers the createShopReportTool as the handler for the 'create_shop_report' tool name in the CallToolRequestSchema switch statement.
    case 'create_shop_report': return await createShopReportTool(args);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/emmy-design/webasyst-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server