Skip to main content
Glama
Buu-AI

Buu AI MCP Server

generate_image

Create custom images using the Buu AI MCP Server by specifying a subthread ID for tailored graphic generation.

Instructions

[PRIVATE] - Generate image

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subthreadIdYesSubthread ID used to generate the image

Implementation Reference

  • The handler function that implements the core logic of the 'generate_image' tool by executing a GraphQL mutation via the client and handling the response or error.
    async ({ subthreadId }) => {
      try {
        const response = await client.request(generateImageQuery, { subthreadId });
        return { content: [{ type: 'text', text: JSON.stringify(response) }] };
      } catch (error) {
        console.error('Error calling generate_image:', error);
        return {
          isError: true,
          content: [
            {
              type: 'text',
              text: `Error: Failed to generate image. ${error}`,
            },
          ],
        };
      }
    }
  • Zod schema defining the input parameters for the 'generate_image' tool.
    {
      subthreadId: z.string().describe('Subthread ID used to generate the image'),
    },
  • The server.tool() call that registers the 'generate_image' tool with the MCP server, specifying name, description, input schema, and handler.
    server.tool(
      'generate_image',
      '[PRIVATE] - Generate image',
      {
        subthreadId: z.string().describe('Subthread ID used to generate the image'),
      },
      async ({ subthreadId }) => {
        try {
          const response = await client.request(generateImageQuery, { subthreadId });
          return { content: [{ type: 'text', text: JSON.stringify(response) }] };
        } catch (error) {
          console.error('Error calling generate_image:', error);
          return {
            isError: true,
            content: [
              {
                type: 'text',
                text: `Error: Failed to generate image. ${error}`,
              },
            ],
          };
        }
      }
    );
  • GraphQL mutation query definition used by the generate_image handler to request image generation.
    const generateImageQuery = gql`
      mutation GenerateImage($subthreadId: String!) {
        generateImage(subthreadId: $subthreadId) {
          ... on GenRequest {
            _id
            subthreadId
            teamId
            status
            metadata
            type
            images {
              alt
              keyS3
              size
              type
              url
            }
            model_mesh {
              alt
              keyS3
              size
              type
              url
            }
            timings {
              inference
            }
            credits
            createdAt
            updatedAt
            address
          }
          ... on HandledError {
            code
            message
          }
        }
      }
    `;
  • src/index.ts:47-47 (registration)
    Call to registerGenRequestTools function, which includes registration of the 'generate_image' tool.
    registerGenRequestTools(server, buuServerClient);
Behavior1/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Generate image' gives no information about what the tool actually does behaviorally—whether it creates, modifies, or retrieves images; what permissions or authentication might be required; whether it has side effects like rate limits or data storage; or what the expected output looks like. This is inadequate for a tool with no 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.

Conciseness5/5

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

The description is extremely concise with just two words, 'Generate image', and includes a privacy marker '[PRIVATE]' that efficiently signals restricted use. There's no wasted verbiage, and it's front-loaded with the core action. For its brevity, every element serves a purpose, though the content itself is insufficient.

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

Completeness1/5

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

Given the complexity implied by 'generate' (a creation/mutation action), no annotations, no output schema, and sibling tools that suggest overlapping functionality, the description is severely incomplete. It fails to explain what the tool does, how it behaves, what it returns, or when to use it, leaving critical gaps for agent understanding and tool selection.

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?

The input schema has 100% description coverage, with the single parameter 'subthreadId' clearly documented as 'Subthread ID used to generate the image'. The description adds no additional parameter semantics beyond what the schema provides. With high schema coverage, the baseline score of 3 is appropriate, as the schema adequately handles parameter documentation without needing description compensation.

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 'Generate image' is a tautology that merely restates the tool name without adding specificity. It doesn't clarify what type of image is generated, from what source, or for what purpose. While it includes a verb and resource, it lacks the differentiation needed to understand what makes this tool unique compared to siblings like 'generate_model' or 'subthread_generate'.

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

Usage Guidelines1/5

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

The description provides no guidance on when to use this tool versus alternatives. There's no mention of context, prerequisites, or exclusions. Given sibling tools like 'generate_model' and 'subthread_generate' that might have overlapping functions, the absence of any usage guidelines leaves the agent with no basis for selecting between them.

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