Skip to main content
Glama

restore_contexts

Pull contexts from mcp-memory-service and write them into CONTEXTS_PATH. Existing files are left untouched unless force is true, which keeps a .bak of the previous file.

Instructions

Pull contexts from mcp-memory-service and write them into CONTEXTS_PATH. Existing files are left untouched unless force is true, which keeps a .bak of the previous file.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "restore_contexts"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNoOverwrite existing context files, keeping a .bak (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0-beta.4

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It does disclose the important safety trait (existing files untouched by default, .bak created on force), which is genuinely useful, but says nothing about whether this is a network call to mcp-memory-service, which contexts are selected, permission requirements, or what happens on partial failure.

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?

Two sentences, front-loaded with the source and destination, with the overwrite caveat placed after the primary action. No filler, though the clause about force is slightly tangled ('unless force is true, which keeps a .bak').

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 single-optional-parameter tool with no output schema, the core write semantics are covered. The significant remaining gap is selection scope: the agent cannot tell whether all remote contexts are restored or some subset, and there is no indication of what the tool returns or how failures surface.

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 coverage is 100% and the schema already documents force as 'Overwrite existing context files, keeping a .bak'. The description mostly restates that, adding only the default-state clarity that non-forced runs leave files untouched.

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 uses a specific verb+resource pair — pull contexts from mcp-memory-service and write them into CONTEXTS_PATH — so the agent knows exactly what happens. It stops short of differentiating from the sibling sync_contexts, which reads similarly and would need explicit contrast.

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

Usage Guidelines3/5

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

Usage is only implied by the words 'restore' and 'pull/write'; there is no statement of when to prefer this over sync_contexts or list_available_contexts. The one useful conditional it does give — the force behavior — is about a parameter, not about tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.