get_workspace_analytics
Retrieve workspace analytics to monitor the performance of AI-generated websites, pages, and blog posts.
Instructions
Get workspace analytics.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server/index.js:162-171 (registration)Registration of the 'get_workspace_analytics' tool. No inputs, returns workspace analytics data from the API endpoint /v1/workspace/analytics.
server.tool( "get_workspace_analytics", "Get workspace analytics.", {}, { title: "Get Workspace Analytics", readOnlyHint: true, destructiveHint: false, openWorldHint: false }, async () => { const data = await apiCall("/v1/workspace/analytics", "GET"); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } ); - server/index.js:167-170 (handler)Handler function for get_workspace_analytics. Makes a GET request to /v1/workspace/analytics and returns the JSON response as text content.
async () => { const data = await apiCall("/v1/workspace/analytics", "GET"); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } - server/index.js:112-123 (helper)Helper function that performs the actual HTTP API call to the Lindo AI backend with the configured API key.
async function apiCall(path, method, body) { const url = `${BASE_URL}${path}`; const res = await fetch(url, { method, headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json", }, ...(body ? { body: JSON.stringify(body) } : {}), }); return res.json(); }