Skip to main content
Glama
Buu-AI

Buu AI MCP Server

subthread_get_all

Retrieve all subthreads for a team using pagination and filters to organize and manage thread data efficiently on Buu AI MCP Server.

Instructions

[PRIVATE] Get all team's subthreads.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filtersNoFilter criteria to narrow down thread results
paginationNoPagination settings for querying threads

Implementation Reference

  • The async handler function for the 'subthread_get_all' tool. It sends a GraphQL query to fetch subthreads using the provided pagination and filters, returns the JSON response, or an error message if the request fails.
    async ({ pagination, filters }) => {
      try {
        const response = await client.request(getSubthreadsQuery, { pagination, filters });
        return { content: [{ type: 'text', text: JSON.stringify(response) }] };
      } catch (error) {
        console.error('Error calling subthread_get_all:', error);
        return {
          isError: true,
          content: [{ type: 'text', text: `Error: Failed to retrieve subthreads. ${error}` }],
        };
      }
    }
  • Zod input schema defining optional 'pagination' and 'filters' parameters for the tool.
    {
      pagination: z.any().optional().describe('Pagination settings for querying threads'),
      filters: z.any().optional().describe('Filter criteria to narrow down thread results'),
    },
  • Direct registration of the 'subthread_get_all' tool via server.tool() call within registerSubthreadTools function.
    server.tool(
      'subthread_get_all',
      "[PRIVATE] Get all team's subthreads.",
      {
        pagination: z.any().optional().describe('Pagination settings for querying threads'),
        filters: z.any().optional().describe('Filter criteria to narrow down thread results'),
      },
      async ({ pagination, filters }) => {
        try {
          const response = await client.request(getSubthreadsQuery, { pagination, filters });
          return { content: [{ type: 'text', text: JSON.stringify(response) }] };
        } catch (error) {
          console.error('Error calling subthread_get_all:', error);
          return {
            isError: true,
            content: [{ type: 'text', text: `Error: Failed to retrieve subthreads. ${error}` }],
          };
        }
      }
    );
  • src/index.ts:48-48 (registration)
    Invocation of registerSubthreadTools in the main server setup, which registers the subthread_get_all tool among others.
    registerSubthreadTools(server, buuServerClient);
  • GraphQL query definition 'getSubthreadsQuery' used by the subthread_get_all handler to fetch subthreads.
    const getSubthreadsQuery = gql`
      query GetSubthreads($pagination: Pagination, $filters: SubthreadFilter) {
        getSubthreads(pagination: $pagination, filters: $filters) {
          ... on SubthreadsPage {
            items {
              _id
              createdAt
              updatedAt
              teamId
              threadId
              prompt
              style
              imageUrl
              strength
              address
            }
            metadata {
              limit
              offset
              orderBy
              orderDirection
              numElements
              total
              page
              pages
            }
          }
          ... on HandledError {
            code
            message
          }
        }
      }
    `;
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 discloses the tool fetches subthreads but lacks behavioral details: it doesn't specify if this is a read-only operation, what permissions are needed, whether it's paginated (implied by schema but not stated), rate limits, or what the return format looks like. The '[PRIVATE]' hint suggests access restrictions but isn't elaborated.

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 concise with two short phrases, front-loading the '[PRIVATE]' context and core purpose. There's no wasted text, though it could be more informative. The structure is clear but minimal, earning a high score for efficiency despite under-specification.

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 for a tool with parameters and sibling alternatives. It lacks details on behavior, output format, and differentiation from other tools. For a 'get all' operation with filtering and pagination, more context is needed to guide effective use, making it inadequate.

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%, so the schema already documents both parameters ('filters' and 'pagination') adequately. The description adds no parameter-specific information beyond what the schema provides, such as example filter criteria or pagination defaults. With high schema coverage, baseline 3 is appropriate as the description doesn't compensate but doesn't need to.

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

Purpose3/5

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

The description states the tool's purpose ('Get all team's subthreads') which is clear but vague. It specifies the verb ('Get') and resource ('subthreads') with scope ('team's'), but doesn't differentiate from sibling tools like 'subthread_get' or 'genrequest_get_all'. The '[PRIVATE]' prefix adds context but doesn't clarify the core functionality.

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 guidance is provided on when to use this tool versus alternatives. The description doesn't mention sibling tools like 'subthread_get' (likely for single subthread) or 'genrequest_get_all' (for different resource), leaving the agent to infer usage from naming alone. There are no explicit when/when-not instructions or prerequisites.

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