Skip to main content
Glama
treasure-data

Treasure Data MCP Server

Official

parent_segment_sql

Retrieves the SQL statement for a specified parent segment (audience) using parent_segment_id; find available IDs first with list_parent_segments.

Instructions

[EXPERIMENTAL] Get the SQL statement for a parent segment (audience). Requires parent_segment_id parameter. Use list_parent_segments first to find available parent segment IDs.

Input Schema

NameRequiredDescriptionDefault
parent_segment_idYesThe parent segment ID (required). Use list_parent_segments to find available IDs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it does disclose two useful traits: the tool is marked [EXPERIMENTAL] and it is a read-style 'get'. It says nothing about permissions, whether the SQL is generated or stored, or what the response looks like, which leaves meaningful behavioral gaps for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with purpose followed by the required parameter and the discovery step. Nothing is redundant, though the parameter sentence largely duplicates the schema and could be trimmed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter read tool with no output schema and no annotations, the description covers discovery and prerequisite but not the nature of the returned SQL (e.g., full statement vs snippet, dialect, format). An agent can invoke it, but not anticipate the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the single parameter is documented in-schema, so the baseline is 3. The description merely restates that parent_segment_id is required and points to list_parent_segments, adding no format or semantics beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Get the SQL statement for a parent segment (audience)', which is concrete and names what is retrieved. It does not explicitly differentiate itself from the sibling segment_sql or query tools, so an agent must infer that this one is scoped to parent segments.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a useful prerequisite workflow ('use list_parent_segments first'), which is real guidance for finding the ID. However, it never says when to choose this over segment_sql, get_parent_segment, or query, nor does it state any exclusions, so the usage context is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.