Skip to main content
Glama
lordstyled55

MCP Goose Subagents Server

by lordstyled55

create_goose_recipe

Create reusable Goose recipes for specialized subagents like code reviewers and security auditors, enabling AI clients to delegate tasks to autonomous developer teams with custom instructions and extensions.

Instructions

Create a reusable Goose recipe for specialized subagents

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
recipe_nameYesName of the recipe
roleYesAgent role (e.g., code_reviewer, security_auditor)
instructionsYesDetailed instructions for the agent
extensionsNoList of Goose extensions to enable
parametersNoRecipe parameters

Implementation Reference

  • The handler function that implements the create_goose_recipe tool. It constructs a recipe object from input args, serializes it to YAML using objectToYaml helper, writes it to a file in goose-recipes directory, and returns a success message.
    async createGooseRecipe(args) {
      const { recipe_name, role, instructions, extensions = [], parameters = {} } = args;
    
      const recipe = {
        id: recipe_name,
        version: '1.0.0',
        title: `${role.replace(/_/g, ' ').replace(/\b\w/g, l => l.toUpperCase())} Recipe`,
        description: `Specialized subagent for ${role}`,
        instructions: instructions,
        activities: [
          `Perform ${role} tasks`,
          'Analyze and provide feedback',
          'Generate deliverables'
        ],
        extensions: extensions.map(ext => ({
          type: 'builtin',
          name: ext,
          display_name: ext.replace(/_/g, ' ').replace(/\b\w/g, l => l.toUpperCase()),
          timeout: 300,
          bundled: true
        })),
        parameters: Object.entries(parameters).map(([key, value]) => ({
          key,
          input_type: typeof value,
          requirement: 'optional',
          description: `Parameter for ${key}`,
          default: value
        })),
        prompt: instructions
      };
    
      // Create recipes directory if it doesn't exist
      const recipesDir = path.join(process.cwd(), 'goose-recipes');
      await fs.mkdir(recipesDir, { recursive: true });
    
      // Write recipe file
      const recipeFile = path.join(recipesDir, `${recipe_name}.yaml`);
      const yamlContent = this.objectToYaml(recipe);
      await fs.writeFile(recipeFile, yamlContent);
    
      return {
        content: [
          {
            type: 'text',
            text: `Successfully created Goose recipe "${recipe_name}" at ${recipeFile}\n\nRecipe details:\n- Role: ${role}\n- Extensions: ${extensions.join(', ') || 'none'}\n- Parameters: ${Object.keys(parameters).join(', ') || 'none'}\n\nTo use this recipe, set GOOSE_RECIPE_PATH environment variable to the recipes directory or place the recipe in your working directory.`
          }
        ]
      };
    }
  • src/index.js:87-117 (registration)
    Registration of the create_goose_recipe tool in the ListToolsRequestSchema handler, including name, description, and input schema definition.
    {
      name: 'create_goose_recipe',
      description: 'Create a reusable Goose recipe for specialized subagents',
      inputSchema: {
        type: 'object',
        properties: {
          recipe_name: {
            type: 'string',
            description: 'Name of the recipe'
          },
          role: {
            type: 'string',
            description: 'Agent role (e.g., code_reviewer, security_auditor)'
          },
          instructions: {
            type: 'string',
            description: 'Detailed instructions for the agent'
          },
          extensions: {
            type: 'array',
            items: { type: 'string' },
            description: 'List of Goose extensions to enable'
          },
          parameters: {
            type: 'object',
            description: 'Recipe parameters'
          }
        },
        required: ['recipe_name', 'role', 'instructions']
      }
    },
  • Input schema definition for the create_goose_recipe tool, specifying properties and required fields.
    inputSchema: {
      type: 'object',
      properties: {
        recipe_name: {
          type: 'string',
          description: 'Name of the recipe'
        },
        role: {
          type: 'string',
          description: 'Agent role (e.g., code_reviewer, security_auditor)'
        },
        instructions: {
          type: 'string',
          description: 'Detailed instructions for the agent'
        },
        extensions: {
          type: 'array',
          items: { type: 'string' },
          description: 'List of Goose extensions to enable'
        },
        parameters: {
          type: 'object',
          description: 'Recipe parameters'
        }
      },
      required: ['recipe_name', 'role', 'instructions']
    }
  • Helper function used by the handler to convert the recipe object to YAML format for file writing.
    objectToYaml(obj, indent = 0) {
      let yaml = '';
      const spaces = '  '.repeat(indent);
    
      for (const [key, value] of Object.entries(obj)) {
        if (value === null || value === undefined) continue;
    
        if (Array.isArray(value)) {
          yaml += `${spaces}${key}:\n`;
          for (const item of value) {
            if (typeof item === 'object') {
              yaml += `${spaces}- \n${this.objectToYaml(item, indent + 1).split('\n').map(line => line ? `${spaces}  ${line}` : '').join('\n')}\n`;
            } else {
              yaml += `${spaces}- ${item}\n`;
            }
          }
        } else if (typeof value === 'object') {
          yaml += `${spaces}${key}:\n${this.objectToYaml(value, indent + 1)}`;
        } else if (typeof value === 'string' && value.includes('\n')) {
          yaml += `${spaces}${key}: |\n${value.split('\n').map(line => `${spaces}  ${line}`).join('\n')}\n`;
        } else {
          yaml += `${spaces}${key}: ${value}\n`;
        }
      }
    
      return yaml;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool creates something, implying a write operation, but doesn't cover critical aspects like permissions needed, whether recipes are editable or deletable, rate limits, or what happens on success/failure. This is inadequate for a creation tool with zero 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 a single, efficient sentence that directly states the tool's purpose without any wasted words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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 the complexity (5 parameters, nested objects, no output schema, and no annotations), the description is incomplete. It doesn't explain the tool's behavior, output expectations, or how it relates to sibling tools. For a creation tool with rich input schema but no other structured data, more context is needed.

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 fully documents all 5 parameters. The description adds no additional meaning beyond what's in the schema (e.g., it doesn't explain what 'Goose extensions' are or how 'parameters' are used). Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('Create') and resource ('reusable Goose recipe for specialized subagents'), providing a specific purpose. However, it doesn't explicitly differentiate from sibling tools like 'delegate_to_subagents' or 'list_active_subagents', which prevents a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives like 'delegate_to_subagents' or 'get_subagent_results'. It lacks context about prerequisites, such as when recipes are needed versus direct delegation, leaving the agent without usage direction.

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

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/lordstyled55/goose-mcp'

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