Skip to main content
Glama
Buu-AI

Buu AI MCP Server

subthread_get

Retrieve a team's subthread using its unique ID to access specific conversation details within the Buu AI MCP Server.

Instructions

[PRIVATE] Get team's subthread by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subthreadIdYesID of the subthread to fetch

Implementation Reference

  • The async handler function for the 'subthread_get' tool. It takes a subthreadId, queries the GraphQL client using getSubthreadQuery, and returns the response or an error.
      async ({ subthreadId }) => {
        try {
          const response = await client.request(getSubthreadQuery, { subthreadId });
          return { content: [{ type: 'text', text: JSON.stringify(response) }] };
        } catch (error) {
          console.error('Error calling subthread_get:', error);
          return {
            isError: true,
            content: [{ type: 'text', text: `Error: Failed to retrieve subthread. ${error}` }],
          };
        }
      }
    );
  • Input schema validation for the subthread_get tool using Zod: requires a subthreadId string.
    {
      subthreadId: z.string().describe('ID of the subthread to fetch'),
    },
  • Registration of the 'subthread_get' tool using server.tool(), including description, input schema, and inline handler function.
    server.tool(
      'subthread_get',
      "[PRIVATE] Get team's subthread by ID.",
      {
        subthreadId: z.string().describe('ID of the subthread to fetch'),
      },
      async ({ subthreadId }) => {
        try {
          const response = await client.request(getSubthreadQuery, { subthreadId });
          return { content: [{ type: 'text', text: JSON.stringify(response) }] };
        } catch (error) {
          console.error('Error calling subthread_get:', error);
          return {
            isError: true,
            content: [{ type: 'text', text: `Error: Failed to retrieve subthread. ${error}` }],
          };
        }
      }
    );
  • GraphQL query 'getSubthreadQuery' definition used by the subthread_get handler to fetch the subthread details by ID.
    const getSubthreadQuery = gql`
      query Subthread($subthreadId: String!) {
        getSubthread(subthreadId: $subthreadId) {
          ... on Subthread {
            _id
            createdAt
            updatedAt
            teamId
            threadId
            prompt
            style
            imageUrl
            strength
            address
          }
          ... on HandledError {
            code
            message
          }
        }
      }
    `;
  • src/index.ts:48-48 (registration)
    Call to registerSubthreadTools on the main MCP server instance, which registers the subthread_get tool among others.
    registerSubthreadTools(server, buuServerClient);
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states this is a read operation ('Get'), but lacks details on permissions (e.g., team membership requirements), error handling (e.g., invalid ID), rate limits, or response format. The '[PRIVATE]' tag hints at access restrictions but is vague. For a tool with zero annotation coverage, this is insufficient behavioral disclosure.

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?

The description is brief and front-loaded, with the core purpose stated in one sentence. The '[PRIVATE]' tag adds context efficiently. However, it could be more structured by separating the privacy note from the action, and the sentence is slightly terse without elaboration on the 'team' aspect.

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

Completeness2/5

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

Given no annotations and no output schema, the description is incomplete. It lacks details on what a 'subthread' is in this context, team-specific requirements, expected return values, or error conditions. For a tool with minimal structured data, the description should provide more contextual information to guide effective use.

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%, with the single parameter 'subthreadId' documented as 'ID of the subthread to fetch'. The description adds no additional meaning beyond this, as it only repeats 'by ID'. Baseline 3 is appropriate since the schema fully covers parameter semantics.

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?

The description clearly states the action ('Get') and resource ('team's subthread by ID'), making the purpose understandable. It distinguishes from sibling 'subthread_get_all' by specifying retrieval of a single item by ID rather than all items. However, it doesn't fully differentiate from 'subthread_generate' (which likely creates subthreads) beyond the verb difference.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives is provided. The description implies usage when you have a specific subthread ID, but it doesn't mention prerequisites (e.g., needing team access), exclusions, or comparisons to siblings like 'subthread_get_all' for listing all subthreads or 'subthread_generate' for creation.

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

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Buu-AI/buu-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server