Package com.tnsai.mcp.goose
Class GooseRecipeParser
java.lang.Object
com.tnsai.mcp.goose.GooseRecipeParser
Parses Goose recipe files (JSON workflow definitions).
Goose recipes define sequences of tool calls that form a workflow.
This parser reads JSON recipe files and converts them to structured
GooseRecipeParser.Recipe objects that can be further converted to MCP tool calls.
Expected JSON format:
{
"name": "deploy-app",
"description": "Deploy an application",
"steps": [
{
"tool": "build_project",
"params": { "target": "production" },
"output": "buildResult"
},
{
"tool": "deploy",
"params": { "artifact": "{{buildResult}}" }
}
]
}
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a Goose recipe (workflow definition).static final recordRepresents a single step within a Goose recipe. -
Method Summary
Modifier and TypeMethodDescriptionstatic GooseRecipeParser.RecipeParses a recipe from a JSON string.toMcpCalls(GooseRecipeParser.Recipe recipe) Converts recipe steps to a list of MCP tool call parameter maps.
-
Method Details
-
parse
Parses a recipe from a JSON string.- Parameters:
content- the JSON content to parse- Returns:
- the parsed recipe
- Throws:
IOException- if parsing fails
-
toMcpCalls
Converts recipe steps to a list of MCP tool call parameter maps.Each map in the result contains:
name- the tool namearguments- the tool arguments
- Parameters:
recipe- the recipe to convert- Returns:
- list of MCP tool call parameter maps
-