Skip to main content
Glama
taylorleese

mcp-toolz

context_save

Save context entries like conversations, code snippets, suggestions, or errors for project continuity across sessions. Organize with titles, content, and tags for easy retrieval.

Instructions

Save a new context entry for the current project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesContext type
titleYesContext title
contentYesContext content
tagsNoTags for categorization
session_context_idNoLink to existing context ID

Implementation Reference

  • Executes the context_save tool: parses input arguments, constructs ContextContent and ContextEntry based on type, adds session info and optional link, then saves via storage.
    if name == "context_save":
        from models import ContextContent
    
        context_type = arguments["type"]
        title = arguments["title"]
        content_text = arguments["content"]
        tags = arguments.get("tags", [])
        session_context_id = arguments.get("session_context_id")
    
        # Parse content based on type
        if context_type == "conversation":
            content = ContextContent(messages=[content_text])
        elif context_type == "code":
            content = ContextContent(code={"snippet": content_text})
        elif context_type == "suggestion":
            content = ContextContent(suggestions=content_text)
        elif context_type == "error":
            content = ContextContent(errors=content_text)
        else:
            content = ContextContent(messages=[content_text])
    
        # Create context entry with session info
        context = ContextEntry(
            type=context_type,
            title=title,
            content=content,
            tags=tags,
            project_path=os.getcwd(),
            session_id=self.session_id,
            session_timestamp=self.session_timestamp,
        )
    
        # Link to session context if provided
        if session_context_id:
            context.metadata["session_context_id"] = session_context_id
    
        self.storage.save_context(context)
        return [TextContent(type="text", text=f"✓ Context saved (ID: {context.id})")]
  • Registers the context_save tool in list_tools() with name, description, and input schema defining required fields and options.
    Tool(
        name="context_save",
        description="Save a new context entry for the current project",
        inputSchema={
            "type": "object",
            "properties": {
                "type": {
                    "type": "string",
                    "description": "Context type",
                    "enum": ["conversation", "code", "suggestion", "error"],
                },
                "title": {"type": "string", "description": "Context title"},
                "content": {"type": "string", "description": "Context content"},
                "tags": {
                    "type": "array",
                    "items": {"type": "string"},
                    "description": "Tags for categorization",
                },
                "session_context_id": {
                    "type": "string",
                    "description": "Link to existing context ID",
                },
            },
            "required": ["type", "title", "content"],
        },
    ),
  • JSON schema for input validation of context_save tool parameters.
    inputSchema={
        "type": "object",
        "properties": {
            "type": {
                "type": "string",
                "description": "Context type",
                "enum": ["conversation", "code", "suggestion", "error"],
            },
            "title": {"type": "string", "description": "Context title"},
            "content": {"type": "string", "description": "Context content"},
            "tags": {
                "type": "array",
                "items": {"type": "string"},
                "description": "Tags for categorization",
            },
            "session_context_id": {
                "type": "string",
                "description": "Link to existing context ID",
            },
        },
        "required": ["type", "title", "content"],
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states it's for saving a new context entry, implying a write operation, but doesn't cover critical aspects like whether it requires specific permissions, how it handles duplicates, what happens on success/failure, or if there are rate limits. This leaves significant gaps for an agent to understand the tool's behavior beyond the basic action.

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 a single, clear sentence with zero waste—it directly states the tool's purpose without unnecessary words. It's appropriately sized for a tool with a straightforward action, making it easy for an agent to parse and understand quickly.

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

Completeness2/5

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

Given the complexity of a write operation with 5 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral traits (e.g., error handling, permissions), usage context (e.g., project requirements), and output expectations. While the schema covers parameters well, the overall context for safe and effective use is insufficient.

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?

Schema description coverage is 100%, meaning all parameters are documented in the schema itself (e.g., type with enum values, title, content, tags, session_context_id). The description adds no additional meaning beyond what the schema provides, such as explaining how parameters interact or providing usage examples. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

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 action ('Save') and resource ('a new context entry for the current project'), making the purpose understandable. It distinguishes from siblings like context_delete, context_get, context_list, and context_search by specifying it's for saving new entries rather than other operations. However, it doesn't explicitly differentiate from todo_save or other 'save' tools, which slightly limits specificity.

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. It doesn't mention when to use context_save over context_list for viewing entries, context_search for finding existing ones, or todo_save for saving todos. There's also no information about prerequisites, such as needing an active project, which could be implied but isn't stated.

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/taylorleese/mcp-toolz'

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