Skip to main content
Glama

design_context_architecture

Designs custom agent architectures and persistent workflows by generating component blueprints based on user goals and constraints.

Instructions

Architects a custom context system based on a high-level goal (The Architect).
Returns a blueprint of Sutra components (Molecules, Cells, Organs, Thinking Models).

Use this when the user wants to build a persistent agent or complex workflow
rather than solving a single immediate task.

Args:
    goal: The user's objective (e.g., "Build a writing assistant that learns my style").
    constraints: Optional limits (e.g., "Must be lightweight").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalYes
constraintsNo

Implementation Reference

  • The core handler function for the design_context_architecture tool. Decorated with @mcp.tool() for MCP registration. Validates inputs and generates a context architecture blueprint based on goal and constraints using heuristic matching.
    @mcp.tool()
    def design_context_architecture(goal: str, constraints: str | None = None) -> dict:
        """
        Architects a custom context system based on a high-level goal (The Architect).
        Returns a blueprint of Sutra components (Molecules, Cells, Organs, Thinking Models).
    
        Use this when the user wants to build a persistent agent or complex workflow
        rather than solving a single immediate task.
    
        Args:
            goal: The user's objective (e.g., "Build a writing assistant that learns my style").
            constraints: Optional limits (e.g., "Must be lightweight").
        """
        try:
            model = DesignArchitectureInput(goal=goal, constraints=constraints)
        except ValidationError as e:
            return {"error": str(e)}
    
        g = model.goal.lower()
        c = (model.constraints or "").lower()
    
        # Blueprint Defaults
        blueprint: dict[str, Any] = {
            "name": "Custom System",
            "rationale": "General purpose context structure.",
            "components": {
                "molecule": "Standard CoT",
                "cell": "cell.protocol.key_value",
                "organ": None,
                "cognitive": "reasoning.understand_question",
            },
        }
    
        if "lightweight" in c:
            blueprint["name"] += " (Light)"
    
        # Heuristic Architecture Logic
        if "debate" in g or "perspective" in g:
            blueprint["name"] = "Debate System"
            blueprint["components"]["organ"] = "organ.debate_council"
            blueprint["rationale"] = "Uses a multi-perspective organ to balance viewpoints."
    
        elif "research" in g or "report" in g or "synthesize" in g:
            blueprint["name"] = "Research Engine"
            blueprint["components"]["organ"] = "organ.research_synthesis"
            blueprint["components"]["cell"] = (
                "cell.protocol.episodic"  # Log research trails
            )
            blueprint["rationale"] = (
                "Combines a synthesis organ with episodic memory to track findings."
            )
    
        elif "learn" in g or "remember" in g or "style" in g:
            blueprint["name"] = "Adaptive Assistant"
            blueprint["components"]["cell"] = "cell.protocol.windowed"
            blueprint["rationale"] = (
                "Uses windowed memory to maintain recent context and style."
            )
    
        elif "code" in g or "bug" in g or "review" in g:
            blueprint["name"] = "Code Auditor"
            blueprint["components"]["cognitive"] = "reasoning.verify_logic"
            blueprint["rationale"] = "Focuses on logic verification for code correctness."
    
        return blueprint
  • Pydantic input schema (BaseModel) used for validating the parameters of the design_context_architecture tool.
    class DesignArchitectureInput(BaseModel):
        goal: str = Field(
            ..., min_length=5, description="The goal of the system to design."
        )
        constraints: str | None = Field(
            None, description="Optional constraints or preferences."
        )
  • The @mcp.tool() decorator registers the design_context_architecture function as an MCP tool.
    @mcp.tool()
Behavior3/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 describes what the tool does (architects a system) and what it returns (a blueprint), but lacks details about implementation constraints, performance characteristics, or error conditions. It provides basic behavioral context but could be more comprehensive for a tool that presumably creates complex outputs.

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 efficiently structured with three sentences: purpose statement, usage guidelines, and parameter explanations. Each sentence earns its place by providing essential information without redundancy. The information is front-loaded with the most important details first.

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?

For a tool with no annotations, no output schema, and 0% schema description coverage, the description provides adequate basic information but lacks details about the blueprint format, implementation considerations, or error handling. It covers the essential 'what' and 'when' but could provide more context about the 'how' and 'what results' for a complex architectural tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates by explaining both parameters: 'goal' as 'The user's objective' with an example, and 'constraints' as 'Optional limits' with an example. This adds meaningful semantics beyond what the bare schema provides, though it doesn't specify format or validation rules for these parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/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 specific verbs ('Architects a custom context system') and resources ('Sutra components'), and distinguishes it from sibling tools by specifying it's for building persistent agents/complex workflows rather than solving single immediate tasks. The first sentence provides a complete purpose statement.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool ('Use this when the user wants to build a persistent agent or complex workflow rather than solving a single immediate task'), providing clear context and distinguishing it from alternatives that presumably handle single tasks. This gives the agent specific guidance on appropriate usage scenarios.

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