Skip to main content
Glama

get_cell_protocol

Retrieve memory behavior templates for cognitive architectures, enabling structured memory management in AI systems through predefined cell protocols.

Instructions

Returns a cell protocol template describing memory behaviors.

Args:
    name: Identifier of the cell protocol (key_value, windowed, episodic).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNocell.protocol.key_value

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core handler function for the 'get_cell_protocol' MCP tool. Decorated with @mcp.tool() for registration. Validates input using CellProtocolInput, retrieves the protocol template using get_cell_protocol_template, or lists available protocols if not found.
    @mcp.tool()
    def get_cell_protocol(name: str = "cell.protocol.key_value") -> str:
        """
        Returns a cell protocol template describing memory behaviors.
    
        Args:
            name: Identifier of the cell protocol (key_value, windowed, episodic).
        """
        try:
            model = CellProtocolInput(name=name)
        except ValidationError as e:
            return f"Input Validation Error: {e}"
    
        template = get_cell_protocol_template(model.name)
        if template:
            return template
    
        available = ", ".join(sorted(CELL_PROTOCOL_REGISTRY.keys()))
        return (
            f"// Cell protocol '{model.name}' not found. Available protocols: {available}"
        )
  • Pydantic BaseModel used for input schema validation in the get_cell_protocol tool handler.
    class CellProtocolInput(BaseModel):
        name: str = Field(
            "cell.protocol.key_value", min_length=1, description="Cell protocol name."
        )
  • Helper function called by the tool handler to fetch cell protocol templates from the registry.
    def get_cell_protocol_template(name: str) -> Optional[str]:
        """Return a cell protocol template by identifier.
    
        Args:
            name: Protocol key such as 'cell.protocol.key_value'.
    
        Returns:
            The corresponding template string if registered.
        """
        return CELL_PROTOCOL_REGISTRY.get(name)
  • Global registry dictionary mapping protocol names to their template strings, used by get_cell_protocol_template.
    CELL_PROTOCOL_REGISTRY: Final[Dict[str, str]] = {
        "cell.protocol.key_value": CELL_PROTOCOL_KEY_VALUE,
        "cell.protocol.windowed": CELL_PROTOCOL_WINDOWED,
        "cell.protocol.episodic": CELL_PROTOCOL_EPISODIC,
    }
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 the tool returns a template but doesn't clarify if this is a read-only operation, what the output format is (though an output schema exists), or any constraints like rate limits or authentication needs. This leaves significant gaps for a tool with behavioral implications.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, starting with the core purpose. The two sentences are efficient, though the parameter explanation could be more integrated to avoid redundancy. Overall, it avoids unnecessary verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (1 parameter, no annotations, but with an output schema), the description is minimally adequate. It explains the purpose and parameter options but lacks usage guidelines and behavioral context. The presence of an output schema reduces the need to describe return values, but more completeness is needed for effective agent use.

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?

The description adds meaning beyond the input schema by listing possible identifiers (key_value, windowed, episodic) for the 'name' parameter, which the schema doesn't specify. However, with 0% schema description coverage and only 1 parameter, this provides some value but doesn't fully compensate for the lack of schema details, aligning with the baseline expectation.

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 tool's purpose with a specific verb ('Returns') and resource ('a cell protocol template describing memory behaviors'), making it understandable. However, it doesn't differentiate this tool from its siblings (e.g., get_molecular_template, get_protocol_shell), which would require a 5.

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 get_molecular_template or get_protocol_shell. It mentions the 'name' parameter but doesn't explain when specific identifiers (key_value, windowed, episodic) should be used, leaving usage context 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/4rgon4ut/sutra'

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