Skip to main content
Glama

oc_context_import

Import a browser context envelope into a tab, replacing cookies and storage after verifying SHA-256 integrity. Existing data for the origin is cleared before installing the payload.

Instructions

Strict-replace import of a ContextEnvelope produced by oc_context_export. Verifies the SHA-256 integrity hash first — on mismatch returns { ok: false, integrityError } WITHOUT applying any state. On success, existing cookies for the envelope origin and the active-origin web storage are CLEARED, then the envelope payload is installed. Merge semantics are intentionally not supported. SECURITY: the envelope is plaintext — the host MUST treat it as a secret.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabIdYesREQUIRED Tab ID to apply the envelope to.
envelopeYesREQUIRED A `ContextEnvelope` produced by `oc_context_export`.
strictOriginNoWhen true, reject the import if the active tab origin does not match `envelope.origin`. Default: false (caller is responsible for navigating).
Behavior1/5

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

Description details destructive actions (clears cookies/web storage) but annotations set destructiveHint=false, creating a direct contradiction per scoring rules. The description itself is transparent, but the contradiction mandates a score of 1.

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?

Three sentences with front-loaded purpose, concise behavioral details, and a critical security note. No filler.

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?

Covers preconditions, integrity check, partial return value for failures, and side effects. Missing success return value description and output schema, which is needed for completeness given complexity.

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% (baseline 3). Description adds overall context but does not improve parameter understanding beyond schema descriptions. Envelope parameter implicitly described via integrity check.

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?

States specific verb ('import'), resource ('ContextEnvelope'), and source ('produced by oc_context_export'). Distinct from sibling tools like oc_context_export.

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

Usage Guidelines4/5

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

Explicitly says 'Strict-replace import' and 'Merge semantics are intentionally not supported,' guiding when to use this tool. Could further clarify alternatives for merge needs, but none listed among siblings.

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/shaun0927/openchrome'

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