Skip to main content
Glama

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
NameRequiredDescriptionDefault
nameNoMyProtocol
intentNo

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.")

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/4rgon4ut/sutra'

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