Skip to main content
Glama
pc-style

MCP Goose Subagents Server

create_goose_recipe

Create reusable Goose recipes to define specialized subagents for development tasks, enabling delegation to autonomous developer teams with custom roles and instructions.

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 main handler function that implements the logic for the 'create_goose_recipe' tool. It constructs a recipe object from inputs, serializes it to YAML, 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.`
          }
        ]
      };
    }
  • The input schema definition for the 'create_goose_recipe' tool, provided in the ListTools response.
      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']
      }
    },
  • src/index.js:151-152 (registration)
    Registration/dispatch in the CallToolRequestSchema handler's switch statement, routing calls to the createGooseRecipe handler.
    case 'create_goose_recipe':
      return await this.createGooseRecipe(args);
  • Helper utility function to convert JavaScript objects to YAML format, specifically used by createGooseRecipe to serialize the recipe.
    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 the full burden of behavioral disclosure. It states 'create' implying a mutation, but doesn't cover permissions, side effects, or response format. This is a significant gap 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 front-loads the core action and resource. It wastes no words and is appropriately sized for the tool's complexity.

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 lack of annotations, the description is incomplete. It doesn't explain what a 'Goose recipe' entails, how it's used, or what happens after creation, leaving critical context gaps for a mutation tool.

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 the schema, such as examples or constraints, but doesn't need to compensate for gaps. Baseline 3 is appropriate when 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 verb 'create' and the resource 'Goose recipe for specialized subagents', making the purpose evident. It distinguishes from siblings like 'delegate_to_subagents' or 'list_active_subagents' by focusing on creation rather than delegation or listing, though it doesn't explicitly mention these distinctions.

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 on prerequisites, such as when a recipe is needed versus direct delegation, leaving usage unclear.

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

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