MCP server for Treasure Data - Query and interact with TD through Model Context Protocol
The server has 23 tools covering Treasure Data querying, CDP, and workflow management. Strengths: all tools have descriptions (100+ chars typical), input schemas are present and properly typed, and the design follows a clear verb_noun naming convention. Critical gaps: (1) NO output schemas documented, the code shows tool implementations but responses are not formally defined in the tool registry, forcing LLMs to infer output structure; (2) parameter descriptions are present but often generic (e.g., 'The database name (optional if TD_DATABASE is configured)' appears 5+ times verbatim); (3) several tools accept object parameters ('retry_params' in retry_session, retry_attempt) with no documented schema for what fields are valid; (4) error handling is minimal, no recovery guidance, no error classification, no examples of invalid input rejection; (5) pagination support exists on some tools (limit, last_id) but is not consistently applied or documented across all list tools; (6) no tool annotations (readOnlyHint, destructiveHint, idempotentHint) despite clear risk classification in the spec (READ_ONLY, WRITE, REVERSIBLE). The code quality is solid (TypeScript, proper validation in security/query-validator.ts), but the MCP tool definitions lack production-grade polish. Average per-tool score: 58.
Get the current database context being used for queries
Get column information for a specific table
Execute write operations (UPDATE, DELETE, INSERT, etc.) when enable_updates=true
Get all tasks within a specific workflow attempt
[EXPERIMENTAL] Get details of a specific parent segment by its ID. Requires parent_segment_id parameter. Use list_parent_segments first to find available parent segment IDs.
[EXPERIMENTAL] Get detailed information about a specific segment including its filtering rules. Requires both parent_segment_id and segment_id parameters. Use list_parent_segments and list_segments first to find available IDs.
No output schemas documented for any tool. Tool definitions in src/server.ts and individual tool files show inputSchema but not outputSchema. LLMs cannot infer what fields to expect in responses, forcing guesswork and increasing hallucination risk. Example: 'query' returns rows but the response format (array of objects? record structure? column names?) is not declared.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 54 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 35 | - | v1 |
Get all attempts for a specific workflow session
Get logs for a specific task within a workflow attempt
Kill a running workflow attempt
[EXPERIMENTAL] List all activations (syndications) for a specific segment. Requires both parent_segment_id and segment_id parameters. Use list_parent_segments and list_segments first to find available IDs.
List all available databases in Treasure Data
[EXPERIMENTAL] List all available parent segments in Treasure Data CDP. Parent segments are the top-level audience groupings that contain child segments.
List all workflow projects in Treasure Data
[EXPERIMENTAL] List all segments under a specific parent segment. Segments are the filtered audiences within a parent segment.
List workflow sessions with optional filtering by project, workflow, status, and time range
List all tables in a specific database
List all workflows in Treasure Data, optionally filtered by project name
[EXPERIMENTAL] Get the SQL query that defines a parent segment. Returns the query used to determine the audience for the parent segment.
Execute a read-only SQL query (SELECT, SHOW, DESCRIBE) using Trino SQL dialect with Treasure Data UDFs. For better performance on large tables, use td_interval(time, '-30d/now') to limit the time range.
Retry a specific workflow attempt
Retry a failed workflow session
[EXPERIMENTAL] Get the SQL query that defines a specific segment. Returns the query used to determine the filtered audience for the segment.
Switch the current database context for subsequent queries
Tool annotations (readOnlyHint, destructiveHint, idempotentHint) are missing from all tool definitions, despite clear risk classifications in the spec (READ_ONLY, WRITE, REVERSIBLE). Without these hints, LLMs cannot distinguish safe from destructive operations and cannot reason about retry safety. Affects: execute (WRITE), kill_attempt (REVERSIBLE), retry_session (REVERSIBLE), retry_attempt (REVERSIBLE).
Undocumented object parameters: 'retry_params' in retry_session and retry_attempt is typed as 'object' with no schema. LLMs cannot know what fields to include. Example: Is it {param_name: value}? {key: value}? What are valid param_names? This forces trial-and-error.
Generic parameter descriptions repeated verbatim across multiple tools (e.g., 'The database name (optional if TD_DATABASE is configured)' in list_tables and describe_table; 'Maximum number of' in list_projects/list_workflows/list_sessions). These feel like copy-paste and lack differentiation. Descriptions should clarify when to use each tool vs. alternatives.
No error handling guidance. Tools like 'execute' (WRITE operation) have no documented error recovery path. If a query fails due to invalid SQL, does the error message guide the LLM to retry, fix the query, or ask the user? The code has audit logging but no recovery-oriented error messages. Example: execute description does not say 'Enable with enable_updates=true' or warn about irreversible effects.
Inconsistent pagination support. list_tables, list_projects, list_workflows, list_sessions support limit/last_id pagination, but list_databases, list_parent_segments, list_segments, list_activations do not. No tool documents pagination behavior (e.g., does last_id cursor persist? what is default limit?). Baseline from rubric: all list tools should support pagination with explicit limits.
Missing dependency hints. Tools like 'get_parent_segment', 'get_segment', 'list_activations' require IDs found only by calling list_parent_segments or list_segments first. Descriptions say 'Use list_parent_segments first to find available parent segment IDs' but do not explain the discovery workflow. For agents, this is critical guidance.
Experimental tools marked '[EXPERIMENTAL]' (list_parent_segments, get_parent_segment, list_segments, list_activations, parent_segment_sql, segment_sql, get_segment) lack versioning or stability guarantees. LLMs may assume these are production-ready. Descriptions should clarify: When will they stabilize? Will the API change? Should agents avoid them for critical workflows?