Skip to main content
Glama

Lookup Trademark

lookup_trademark

Retrieve complete details of a US trademark by entering its USPTO serial number, including mark text, owner, class, dates, status, attorney, and goods/services.

Instructions

Look up a single US trademark by its USPTO serial number. Returns full details including mark text, owner, international class, filing date, registration date, status, attorney, and description of goods/services. Source: USPTO TSDR.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serialYesUSPTO serial number (e.g. 97123456)

Implementation Reference

  • The actual handler function for the lookup_trademark tool. It takes a serial number, calls the Verilex API at /api/v1/trademarks/:serial, and returns the full trademark details as JSON.
      async ({ serial }) => {
        const res = await apiGet<{ dataset: string; data: Record<string, unknown> }>(
          `/api/v1/trademarks/${encodeURIComponent(serial)}`,
        );
    
        if (!res.ok) {
          const msg =
            res.status === 404
              ? `Serial number ${serial} not found in the trademark 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) },
          ],
        };
      },
    );
  • Input schema for lookup_trademark: requires a 'serial' string parameter validated with a regex for 7-8 digits (USPTO serial number format).
    inputSchema: {
      serial: z
        .string()
        .regex(/^\d{7,8}$/, "Serial number must be 7-8 digits")
        .describe("USPTO serial number (e.g. 97123456)"),
    },
  • Registration of the lookup_trademark tool via server.registerTool() with title, description, input schema, and handler.
    server.registerTool(
      "lookup_trademark",
      {
        title: "Lookup Trademark",
        description:
          "Look up a single US trademark by its USPTO serial number. Returns full details " +
          "including mark text, owner, international class, filing date, registration date, " +
          "status, attorney, and description of goods/services. Source: USPTO TSDR.",
        inputSchema: {
          serial: z
            .string()
            .regex(/^\d{7,8}$/, "Serial number must be 7-8 digits")
            .describe("USPTO serial number (e.g. 97123456)"),
        },
      },
      async ({ serial }) => {
        const res = await apiGet<{ dataset: string; data: Record<string, unknown> }>(
          `/api/v1/trademarks/${encodeURIComponent(serial)}`,
        );
    
        if (!res.ok) {
          const msg =
            res.status === 404
              ? `Serial number ${serial} not found in the trademark 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:44-44 (registration)
    Registration call: registerTrademarkTools(server) is invoked during server setup. This is where the trademark tools (including lookup_trademark) are registered on the MCP server.
    registerTrademarkTools(server);
  • The apiGet() helper function used by the handler to make HTTP GET requests to the Verilex backend API. It handles URL building, payment tokens, and parsing staleness headers.
    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,
      };
    }
Behavior3/5

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

No annotations exist, so description carries full burden. It discloses the source and lists returned fields, but does not mention side effects, rate limits, or authentication needs. For a simple read operation, this is adequate but not comprehensive.

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, no redundancy. First sentence states core purpose, second lists return fields. Efficient and well-structured.

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?

Given the simplicity (one required param, no output schema), the description covers the essential context: what the tool does, what it returns, and the data source. Missing error handling or format details, but overall complete for a straightforward lookup.

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% for the single parameter 'serial', which includes pattern and description. Description reinforces the purpose but adds no new semantic meaning beyond the schema. Baseline 3 is appropriate.

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?

Description clearly states the action (look up), resource (US trademark), and identifier (USPTO serial number). It distinguishes itself from sibling tools like 'query_trademarks' which imply batch queries.

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?

Implicitly, it's for a single trademark when you have a serial number, but no explicit when-to-use or alternative guidance is provided. Siblings like 'query_trademarks' suggest broader searches, but the description does not clarify this.

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