Skip to main content
Glama
Buu-AI

Buu AI MCP Server

subthread_generate

Create new subthreads with customizable styles and prompts using the tool on Buu AI MCP Server. Ideal for organizing and expanding discussions or workflows efficiently.

Instructions

[PRIVATE] Generates a new subthread.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptNoOptional prompt text
styleNoOptional style input for subthread generation

Implementation Reference

  • The async handler function that implements the core logic of the subthread_generate tool. It sends a GraphQL mutation with the provided style and prompt to generate a new subthread and returns the JSON response or an error.
    async ({ style, prompt }) => {
      try {
        const response = await client.request(generateSubthreadMutation, {
          style,
          prompt,
        });
        return { content: [{ type: 'text', text: JSON.stringify(response) }] };
      } catch (error) {
        console.error('Error calling subthread_generate:', error);
        return {
          isError: true,
          content: [{ type: 'text', text: `Error: Failed to generate subthread. ${error}` }],
        };
      }
    }
  • Input schema defined using Zod validators for the optional 'style' parameter (SubthreadStyle enum) and 'prompt' parameter (string).
    {
      style: z
        .nativeEnum(SubthreadStyle)
        .optional()
        .describe('Optional style input for subthread generation'),
      prompt: z.string().optional().describe('Optional prompt text'),
    },
  • The server.tool() call that registers the 'subthread_generate' tool, including name, description, input schema, and handler function.
    server.tool(
      'subthread_generate',
      '[PRIVATE] Generates a new subthread.',
      {
        style: z
          .nativeEnum(SubthreadStyle)
          .optional()
          .describe('Optional style input for subthread generation'),
        prompt: z.string().optional().describe('Optional prompt text'),
      },
      async ({ style, prompt }) => {
        try {
          const response = await client.request(generateSubthreadMutation, {
            style,
            prompt,
          });
          return { content: [{ type: 'text', text: JSON.stringify(response) }] };
        } catch (error) {
          console.error('Error calling subthread_generate:', error);
          return {
            isError: true,
            content: [{ type: 'text', text: `Error: Failed to generate subthread. ${error}` }],
          };
        }
      }
    );
  • Type definition enum SubthreadStyle used in the input schema for the style parameter.
    export enum SubthreadStyle {
      'Realistic',
      'LowPoly',
      'Voxel',
      'Stylized',
      'Toon',
      'SciFi',
      'Fantasy',
      'Wireframe',
      'Clay',
      'Metallic',
      'Cute',
      'Isometric',
      'Weapons',
      'Environment',
    }
  • GraphQL mutation query definition used by the handler to perform the subthread generation.
    const generateSubthreadMutation = gql`
      mutation GenerateSubthread($style: JSON, $prompt: String) {
        generateSubthread(style: $style, prompt: $prompt) {
          ... on Subthread {
            _id
            createdAt
            updatedAt
            teamId
            threadId
            prompt
            style
            imageUrl
            strength
            address
          }
          ... on HandledError {
            code
            message
          }
        }
      }
    `;
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It implies a creation/mutation action ('Generates'), but does not disclose permissions, side effects, rate limits, or what 'PRIVATE' entails. This leaves significant gaps for a tool that likely modifies state.

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 extremely concise with only one sentence, but the '[PRIVATE]' prefix adds context without verbosity. It is front-loaded and wastes no words, though it could benefit from slightly more detail to improve clarity without losing efficiency.

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, no output schema, and a description that lacks behavioral and usage details, the description is incomplete. It fails to explain what a subthread is, how generation works, or what the tool returns, leaving the agent with insufficient context for 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%, so the schema already documents both parameters ('prompt' and 'style') with descriptions and enum values. The description adds no additional meaning beyond the schema, resulting in a baseline score of 3 as it neither compensates nor detracts from the schema's coverage.

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

Purpose2/5

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

The description 'Generates a new subthread' restates the tool name 'subthread_generate' with minimal elaboration, making it tautological. It lacks specificity about what a 'subthread' is or what resource it acts upon, and does not differentiate from siblings like 'subthread_get' or 'subthread_get_all'.

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 does not mention prerequisites, context, or exclusions, and fails to reference sibling tools like 'subthread_get' for retrieval or 'generate_image' for other generation tasks.

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