get_protocol_shell
Generate protocol shells for advanced reasoning workflows, including predefined templates or custom structures with specific intents.
Instructions
Returns a Protocol Shell. Can return a specific pre-defined template or a blank shell.
Args:
name: The name of the protocol (e.g., 'reasoning.systematic') OR a custom name.
intent: (Optional) The intent if creating a custom shell.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | MyProtocol | |
| intent | No |
Implementation Reference
- The handler function decorated with @mcp.tool(), implementing the core logic: validates input with ProtocolShellInput, fetches predefined protocol template or generates a generic shell using format_protocol_shell.@mcp.tool() def get_protocol_shell(name: str = "MyProtocol", intent: str | None = None) -> str: """ Returns a Protocol Shell. Can return a specific pre-defined template or a blank shell. Args: name: The name of the protocol (e.g., 'reasoning.systematic') OR a custom name. intent: (Optional) The intent if creating a custom shell. """ try: model = ProtocolShellInput(name=name, intent=intent) except ValidationError as e: return f"Input Validation Error: {e}" template = get_protocol_template(model.name) if template: return template intent_str = model.intent or "Define your intent here" return format_protocol_shell(name=model.name, intent=intent_str)
- Pydantic input schema used for validating the tool's parameters: name and optional intent.class ProtocolShellInput(BaseModel): name: str = Field("MyProtocol", min_length=1, description="Protocol name.") intent: str | None = Field(None, description="Optional intent.")