Skip to main content
Glama
Patents & Trademarks MCP

Patents & Trademarks MCP

by blen-labs

Query USPTO Patent and Trademark Data

execute
Read-onlyIdempotent

Run plain JavaScript in a sandbox to query USPTO patent and trademark APIs, filter searches, and return only the records you need.

Instructions

Run JavaScript inside a sandbox (no net, fs, env, or subprocess). Plain JS only — TypeScript type annotations are rejected. Globals: odp, tsdr. Top-level await is allowed; return the value you want as the result. USPTO serves one request at a time per API key, so calls are queued: prefer one well-filtered search (with fields to trim large records) over many lookups, and return only what you need.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "code": "<code>"
    },
    "name": "execute"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesJavaScript to run inside the sandbox (plain JS: TypeScript type annotations are rejected; top-level await/return are allowed). SDK globals: `odp` (USPTO Open Data Portal: patents, PTAB, petitions, office actions, bulk datasets) and `tsdr` (trademark status).
memoryMbNo
timeoutMsNo

Output Schema

NameRequiredDescriptionDefault
okYesfalse when the code threw, timed out, or broke a limit; see error
logsYes
errorNo
valueNoThe JSON value the code returned
durationMsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.3

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare readOnly/openWorld/idempotent/non-destructive, and the description adds substantial context on top: no net, fs, env, or subprocess access, plain JS only with TypeScript annotations rejected, top-level await permitted, and `return` as the result channel. It also discloses the per-API-key serialization/queueing behavior, which is exactly the kind of rate-limit information annotations cannot express.

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?

Two dense sentences with the sandbox restrictions front-loaded, followed by execution semantics and then the operational constraint. There is no filler; each clause carries information the agent needs before writing code.

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

Completeness4/5

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

An output schema exists, so return values need no explanation, and the description covers the hard parts of a code-execution tool: sandbox boundaries, language restrictions, async/return model, and request serialization. It falls short only on the resource-control parameters (memoryMb, timeoutMs) and on what happens when execution fails or times out.

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 only 33%: `code` is well documented in the schema itself, while memoryMb and timeoutMs have no descriptions in either place, and the description never mentions resource limits. What the description says about `code` (plain JS, TS rejected, globals, top-level await/return) largely restates the schema field description rather than adding new meaning.

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 opens with a specific verb and resource — 'Run JavaScript inside a sandbox' — and immediately scopes it to USPTO patent/trademark data via the odp and tsdr globals. It never names or contrasts with the sibling tools describe_schema and search_api, so the agent must infer that distinction, which keeps it just short of 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 Guidelines4/5

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

It gives concrete usage direction driven by a real constraint: 'USPTO serves one request at a time per API key, so calls are queued: prefer one well-filtered search (with `fields` to trim large records) over many lookups.' That tells the agent how to structure calls, but it does not say when to choose this tool over search_api or describe_schema.

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

Deploy Server

Other Tools