Skip to main content
Glama

flatten_discussion_thread

Read-only

Flattens a Canvas discussion thread into a depth-first list with depth values so agents can read posts end-to-end without expanding replies.

Instructions

Get a discussion as a flat depth-first list instead of a nested tree.

Each entry gets a depth field so the agent can reconstruct indentation without re-walking the tree. Useful for reading a discussion end-to-end in order rather than clicking through "show replies" on every node.

Input Schema

NameRequiredDescriptionDefault
topic_idYes
course_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds genuinely new behavioral context: the ordering is depth-first and every entry carries a `depth` field so indentation can be reconstructed without re-walking the tree. It does not mention pagination or size limits for large threads, which is the main remaining gap.

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 the core behavior, then the output detail, then the motivating use case. No filler, though the second sentence is somewhat explanatory rather than essential.

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?

An output schema exists, so return values need not be explained, and the description explains the ordering semantics well. The notable hole is the two undocumented required parameters, which for a tool that cannot be called without them is a meaningful omission.

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

Parameters2/5

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

Schema description coverage is 0% — course_id and topic_id have bare integer types with no titles beyond the property names. The description never mentions either parameter, so it does nothing to compensate for the coverage gap, and an agent gets no guidance on what a topic_id means relative to a course.

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 plus the transformation applied: returns a discussion as a flat depth-first list instead of a nested tree. That distinguishes it in output shape from the sibling get_discussion_thread, though the sibling is never named explicitly.

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?

The second sentence implies usage (reading a discussion end-to-end rather than expanding 'show replies' node by node), which is a reasonable when-to-use signal. However, it never states when to prefer get_discussion_thread or list_discussions instead, leaving the routing decision to inference.

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