Skip to main content
Glama

Lookup Patent

lookup_patent

Look up a US patent by number to retrieve full details including title, abstract, assignee, inventors, classifications, dates, claims, and citations.

Instructions

Look up a single US patent by patent number. Returns full details including title, abstract, assignee, inventors, CPC classifications, grant date, filing date, number of claims, and citation counts. Source: USPTO PatentsView.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patent_numberYesPatent number (e.g. 11234567, D123456, RE12345)

Implementation Reference

  • Handler function for the lookup_patent tool. Calls the API endpoint /api/v1/patents/{patent_number} with the user-provided patent number, returns patent details (title, abstract, assignee, inventors, CPC classifications, dates, claims count, citations) as JSON.
    async ({ patent_number }) => {
      const res = await apiGet<{ dataset: string; data: Record<string, unknown> }>(
        `/api/v1/patents/${encodeURIComponent(patent_number)}`,
      );
    
      if (!res.ok) {
        const msg =
          res.status === 404
            ? `Patent ${patent_number} not found in the patent dataset.`
            : `API error (${res.status}): ${JSON.stringify(res.data)}`;
        return {
          content: [{ type: "text" as const, text: msg }],
          isError: res.status !== 404,
        };
      }
    
      return {
        content: [
          { type: "text" as const, text: JSON.stringify(res.data.data, null, 2) },
        ],
      };
    },
  • Schema/input definition for lookup_patent tool. Requires a single 'patent_number' string validated by regex (/^[A-Z]{0,2}\d{1,10}[A-Z]?\d*$/). Title and description explain it returns full patent details from USPTO PatentsView.
    server.registerTool(
      "lookup_patent",
      {
        title: "Lookup Patent",
        description:
          "Look up a single US patent by patent number. Returns full details including title, " +
          "abstract, assignee, inventors, CPC classifications, grant date, filing date, " +
          "number of claims, and citation counts. Source: USPTO PatentsView.",
        inputSchema: {
          patent_number: z
            .string()
            .regex(/^[A-Z]{0,2}\d{1,10}[A-Z]?\d*$/, "Invalid patent number format")
            .describe("Patent number (e.g. 11234567, D123456, RE12345)"),
        },
      },
  • Registration of the lookup_patent tool on the MCP server via server.registerTool('lookup_patent', ...) within the registerPatentTools function.
    server.registerTool(
      "lookup_patent",
      {
        title: "Lookup Patent",
        description:
          "Look up a single US patent by patent number. Returns full details including title, " +
          "abstract, assignee, inventors, CPC classifications, grant date, filing date, " +
          "number of claims, and citation counts. Source: USPTO PatentsView.",
        inputSchema: {
          patent_number: z
            .string()
            .regex(/^[A-Z]{0,2}\d{1,10}[A-Z]?\d*$/, "Invalid patent number format")
            .describe("Patent number (e.g. 11234567, D123456, RE12345)"),
        },
      },
      async ({ patent_number }) => {
        const res = await apiGet<{ dataset: string; data: Record<string, unknown> }>(
          `/api/v1/patents/${encodeURIComponent(patent_number)}`,
        );
    
        if (!res.ok) {
          const msg =
            res.status === 404
              ? `Patent ${patent_number} not found in the patent dataset.`
              : `API error (${res.status}): ${JSON.stringify(res.data)}`;
          return {
            content: [{ type: "text" as const, text: msg }],
            isError: res.status !== 404,
          };
        }
    
        return {
          content: [
            { type: "text" as const, text: JSON.stringify(res.data.data, null, 2) },
          ],
        };
      },
    );
  • src/index.ts:33-61 (registration)
    Top-level registration: registerPatentTools(server) is called at line 45 in createMcpServer(), which registers all patent tools including lookup_patent.
    function createMcpServer() {
      const server = new McpServer({
        name: "verilex-data",
        version: "0.3.3",
      });
    
      registerNpiTools(server);
      registerSecTools(server);
      registerPacerTools(server);
      registerWeatherTools(server);
      registerOtcTools(server);
      registerTrademarkTools(server);
      registerPatentTools(server);
      registerCompanyTools(server);
      registerCryptoTools(server);
      registerSanctionsTools(server);
      registerWhaleTools(server);
      registerLabelTools(server);
      registerHolderTools(server);
      registerDexTools(server);
      registerContractTools(server);
      registerPmTools(server);
      registerPmArbTools(server);
      registerPmResolutionTools(server);
      registerEconTools(server);
      registerPmMicroTools(server);
    
      return server;
    }
  • The apiGet helper function used by the lookup_patent handler to make HTTP GET requests to the Verilex API.
    export async function apiGet<T = unknown>(
      path: string,
      params?: Record<string, string | number | undefined>,
    ): Promise<ApiResponse<T>> {
      const url = buildUrl(path, params);
    
      const headers: Record<string, string> = {
        Accept: "application/json",
        "User-Agent": "verilex-mcp-server/0.1.0",
      };
    
      // Forward x402 payment token if present in env (for paid endpoints)
      const paymentToken = process.env.VERILEX_PAYMENT_TOKEN;
      if (paymentToken) {
        headers["X-Payment-Token"] = paymentToken;
      }
    
      const res = await fetch(url, { headers });
      const data = (await res.json()) as T;
    
      const stale = res.headers.get("X-Data-Stale");
      const lastUpdated = res.headers.get("X-Data-Last-Updated");
      const ageSeconds = res.headers.get("X-Data-Age-Seconds");
    
      return {
        ok: res.ok,
        status: res.status,
        data,
        stale: stale === "true",
        lastUpdated: lastUpdated ?? undefined,
        ageSeconds: ageSeconds ? Number(ageSeconds) : undefined,
      };
    }
Behavior4/5

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

Lists specific fields returned and source (USPTO PatentsView), providing useful behavioral context. No annotations exist, so description carries burden adequately.

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 sentences with clear purpose followed by a concise list of returned fields and source. No unnecessary words.

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

Completeness5/5

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

For a simple single-lookup tool with one parameter and no output schema, the description fully explains what it does and what it returns.

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% with a description and pattern; the tool description adds an example already present in schema, so little extra value.

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?

Clearly states the tool looks up a single US patent by number, with a specific verb and resource. Differentiates from sibling tools like patent_stats and query_patents.

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?

States context (look up a single patent by number) but does not explicitly provide when-not-to-use or alternatives 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/carrierone/verilexdata-mcp'

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