{"tools":[{"name":"list_datasources","description":"List published datasources available to the analyst. Use this to discover what data exists before formulating a query. Returns lightweight summaries (id, name, connectionType, status, freshness); call get_datasource for the full schema. Supports nameContains substring filtering and pagination.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"q":{"type":"string","minLength":1,"maxLength":256},"nameContains":{"type":"string","maxLength":200},"connectionType":{"type":"string","maxLength":64},"cursor":{"type":"string"},"pageSize":{"type":"integer","minimum":1,"maximum":100}}}},{"name":"get_datasource","description":"Return the full schema and freshness metadata for a single datasource. Call after list_datasources to learn exact field names, types, and semanticRole before issuing query_datasource or interpreting query_view_data results. The warnings channel may include EXTRACT_STALE if the datasource is past its freshness SLA.","inputSchema":{"type":"object","additionalProperties":false,"required":["datasourceId"],"properties":{"datasourceId":{"type":"string","pattern":"^ds_[a-z2-7]{22}$"}}}},{"name":"query_datasource","description":"Execute a constrained SQL SELECT against a single datasource and return tabular results in JSON or CSV. Use this for raw analytical queries that don't correspond to a saved view. SQL is parser-validated: only SELECT, single-statement, only the alias `data` may be referenced as a table. Row cap is 5000; queries pegging the cap and still overflowing return RESULT_TOO_LARGE.","inputSchema":{"type":"object","additionalProperties":false,"required":["datasourceId","sql"],"properties":{"datasourceId":{"type":"string","pattern":"^ds_[a-z2-7]{22}$"},"sql":{"type":"string","minLength":1,"maxLength":8192},"format":{"enum":["json","csv"]},"pageSize":{"type":"integer","minimum":1,"maximum":5000},"cursor":{"type":"string"}}}},{"name":"list_workbooks","description":"List workbooks (titled collections of related views). Use this to browse what dashboards exist before drilling into one. Returns summaries (id, title, viewCount, updatedAt); call get_workbook for the full view list.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"q":{"type":"string","minLength":1,"maxLength":256},"nameContains":{"type":"string","maxLength":200},"updatedAfter":{"type":"string","format":"date-time"},"cursor":{"type":"string"},"pageSize":{"type":"integer","minimum":1,"maximum":100}}}},{"name":"get_workbook","description":"Return a workbook's title, description, and the list of its views (each view summary embeds its backing datasource as { id, name }). After list_workbooks, use this to see the workbook's contents. Don't loop get_view per item; if you need details on most views, use list_views with workbookId.","inputSchema":{"type":"object","additionalProperties":false,"required":["workbookId"],"properties":{"workbookId":{"type":"string","pattern":"^wb_[a-z2-7]{22}$"}}}},{"name":"list_views","description":"List views, optionally scoped to a workbook. Use this to find a chart by name, by chartType, or to enumerate views under a workbook. Returns summaries with embedded workbook + datasource objects; call get_view for axis labels, encoding, summary stats, and a small data preview.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"workbookId":{"type":"string","pattern":"^wb_[a-z2-7]{22}$"},"chartType":{"type":"string","maxLength":64},"q":{"type":"string","minLength":1,"maxLength":256},"nameContains":{"type":"string","maxLength":200},"cursor":{"type":"string"},"pageSize":{"type":"integer","minimum":1,"maximum":100}}}},{"name":"get_view","description":"Return full detail on a view: chartType, axis labels, encoding, savedFilters, summary statistics for each measure (min/max/avg/trend), and a small data preview (≤50 rows). Embeds workbook + datasource as nested objects. Use this to understand what a chart shows before deciding to query, render, or export it.","inputSchema":{"type":"object","additionalProperties":false,"required":["viewId"],"properties":{"viewId":{"type":"string","pattern":"^vw_[a-z2-7]{22}$"}}}},{"name":"query_view_data","description":"Return the tabular result behind a view, with optional filterOverrides that replace the view's saved filters for the same fields. Use for W3 (apply filters), W5 (compare periods — call twice), W6 (deeper reads than the get_view preview). Default 100 rows, max 1000; for larger reads use export_view_csv.","inputSchema":{"type":"object","additionalProperties":false,"required":["viewId"],"properties":{"viewId":{"type":"string","pattern":"^vw_[a-z2-7]{22}$"},"filterOverrides":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["field","op"],"properties":{"field":{"type":"string","minLength":1},"op":{"enum":["eq","neq","in","not_in","gt","gte","lt","lte","between","like","contains","matches","is_null","not_null"]},"value":{}}},"maxItems":32},"format":{"enum":["json","csv"]},"pageSize":{"type":"integer","minimum":1,"maximum":1000},"cursor":{"type":"string"}}}},{"name":"create_view_render","description":"Create a render job for a view (PNG or SVG), with optional filterOverrides. Returns a renderJobId and one of: status=succeeded with filePath (small/cached renders complete inline; <256KB also returned as inlineBase64), or status=queued/running with a poll_after_ms hint — in that case follow up with get_render_job. Renders are content-addressed and deterministic: same view + filter set + size = same filePath and bytes (cached=true). Supported chart types: bar, pie, treemap, line, histogram.","inputSchema":{"type":"object","additionalProperties":false,"required":["viewId"],"properties":{"viewId":{"type":"string","pattern":"^vw_[a-z2-7]{22}$"},"filterOverrides":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["field","op"],"properties":{"field":{"type":"string","minLength":1},"op":{"enum":["eq","neq","in","not_in","gt","gte","lt","lte","between","like","contains","matches","is_null","not_null"]},"value":{}}},"maxItems":32},"format":{"enum":["png","svg"]},"width":{"type":"integer","minimum":200,"maximum":2000},"height":{"type":"integer","minimum":200,"maximum":2000}}}},{"name":"get_render_job","description":"Poll the status and result of a render job created by create_view_render. Returns status (queued | running | succeeded | failed | expired). On success, the response includes filePath, format, dimensions, appliedFilters, and inlineBase64 if the image is below the inline threshold.","inputSchema":{"type":"object","additionalProperties":false,"required":["renderJobId"],"properties":{"renderJobId":{"type":"string","pattern":"^rj_[a-z2-7]{22}$"}}}},{"name":"export_view_csv","description":"Export the full data behind a view to a CSV file. Use for W8 — extracting raw rows behind a chart. Returns a job-shaped envelope on every call: jobId, status, resultPath are always populated, inlineCsv carries the bytes inline for results under 256KB (a filesystem-round-trip optimization, not a different shape) and is null otherwise. Same jobId is pollable via get_job.","inputSchema":{"type":"object","additionalProperties":false,"required":["viewId"],"properties":{"viewId":{"type":"string","pattern":"^vw_[a-z2-7]{22}$"},"filterOverrides":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["field","op"],"properties":{"field":{"type":"string","minLength":1},"op":{"enum":["eq","neq","in","not_in","gt","gte","lt","lte","between","like","contains","matches","is_null","not_null"]},"value":{}}},"maxItems":32}}}},{"name":"get_job","description":"Poll the status of an async CSV-export job. Returns one of queued/running/completed/failed. On completion, resultPath points to the file under fs/. (Render jobs use the separate get_render_job tool.)","inputSchema":{"type":"object","additionalProperties":false,"required":["jobId"],"properties":{"jobId":{"type":"string","pattern":"^job_[a-z2-7]{22}$"}}}}],"server":{"name":"lookout-mcp","version":"0.1.0"},"protocolVersion":"2025-03-26"}