Skip to main content
Glama

GleanMark USPTO Trademark Search

Run Register Query

run_register_query
Read-onlyIdempotent

Runs one read-only SQL query (SELECT or WITH) against markus_research, a sandboxed PostgreSQL schema of public USPTO and TTAB data, for register questions the purpose-built tools do not cover: novel aggregates, cross-cutting counts, letter-pattern scans and near-duplicate pairs (e.g. registered Class 42 marks whose first seven letters match and whose eighth differs). Requires a signed-in GleanMark account on a Professional plan. Views, schema-qualified as markus_research.: register_marks (one row per mark: serial_number, registration_number, mark_identification, status_code, live_dead_indicator, display_status, owner_name, filing_date, registration_date, status_date, mark_type, goods_services_description, mark_category, attorney_name, law_firm_name, current_owners text[], original_owner, total_events, latest_event_date, latest_event_code, nice_classes text[] such as '042', class_count); register_detail (the full public register row per serial, including supplemental_register_in, mark_drawing_code, correspondent_name, correspondent_address, dates and prosecution flags); case_file_statements (serial_number, type_prefix, text); case_file_events (serial_number, code, date, description_text; event codes match on their 4-character stem); ttab_proceedings and ttab_proceeding_entries (proceeding numbers, types, statuses, dates), ttab_parties, ttab_properties, and ttab_proceeding_marks (proceeding, party role, serial, registration and mark text; one row per property); code tables: event_codes, status_codes, mark_drawing_codes, design_codes, statement_type_codes, international_class_codes, us_class_codes, ttab_entry_codes, ttab_role_codes, ttab_status_codes, ttab_proceeding_types. Limits: one statement, a 30-second budget over a 14M-row register, and at most 500 rows returned, so aggregates suit large populations. Class filters use the indexed form nice_classes @> ARRAY['042']; similarity to a given mark X uses the trigram prefilter mark_identification % 'X' before levenshtein(). A timeout returns hints for narrowing the query. The result includes a population_note describing what was measured; zero rows means nothing on the register matched. Office Actions: office_action_rounds (one row per Office Action letter: serial_number, round_number, is_latest_round, oa_date, resp_date, refusal_types text[], outcome) and office_action_texts (the same rows plus letter_words and response_words, indexed full-text search vectors, and letter_text / response_text). To find what applicants argued, filter response_words @@ websearch_to_tsquery('english', '"phrase one" OR word') with a refusal_types filter and return ts_headline('english', response_text, , 'MaxWords=35,MinWords=15,MaxFragments=2') AS excerpt; never select whole texts or filter them with LIKE or a regex. Search each argument separately, and all rounds, not only is_latest_round. outcome = 'registered' never says a particular refusal or requirement was overcome: compare the letter with the registration in case_file_statements (type_prefix 'TR' gives a translation unless its text says the wording has no meaning in a foreign language; no TR/TL row = none entered; 'D0', 'D1', 'DS' = disclaimers) and check whether later rounds still list the requirement. Read a whole letter or response with read_office_action_document before saying what was argued or how it ended.

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": {
      "sql": "<sql>",
      "question_summary": "<question_summary>"
    },
    "name": "run_register_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesOne read-only SELECT (or WITH … SELECT) against markus_research views only. No semicolons, no writes, no other schemas.
question_summaryYesPlain-English statement of the population being measured, e.g. 'registered Class 42 word marks starting with A whose first 7 letters match another registered mark's'. Returned in the result's population_note.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, so the safety profile is covered; the description then adds real operational context the annotations cannot: a signed-in GleanMark Professional plan requirement, a 30-second budget over a 14M-row register, a 500-row cap, timeout hints, and the meaning of zero rows. It also flags a genuine semantic trap (outcome = 'registered' does not mean a refusal was overcome). It does not describe result shape beyond population_note, but with no output schema the population_note/zero-row explanation covers the essentials.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and the constraint limits are front-loaded, but the body is a single dense run-on block that enumerates columns for a dozen views and then layers on a long Office Actions caveat. Much of the column-level reference would be better served by structured documentation, and the scannability suffers — an agent must parse one long paragraph to find the row limit and the timeout behavior.

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?

For a free-form SQL escape hatch with no output schema, this is unusually complete: it names the views and key columns, states the query grammar and safety limits, documents result metadata via population_note, and redirects to read_office_action_document for full text. The only shortfall is that result-field details beyond population_note are left implicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and both parameters are documented, so the baseline is 3. The description still adds meaning about the sql parameter that the schema does not: only markus_research.<view> references are legal, use nice_classes @> ARRAY['042'] for class filters, use the trigram prefilter mark_identification % 'X' before levenshtein(), and use response_words @@ websearch_to_tsquery with ts_headline for excerpts. The question_summary-to-population_note link merely repeats the schema.

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 a specific verb and resource: runs one read-only SELECT/WITH query against the markus_research PostgreSQL schema. It also carves out its niche explicitly ("register questions the purpose-built tools do not cover: novel aggregates, cross-cutting counts, letter-pattern scans and near-duplicate pairs"), which an agent can use to separate it from search, run_knockout_search, or the count_* siblings.

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

Usage Guidelines5/5

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

Gives explicit routing rules in both directions: use this only for questions the purpose-built tools do not cover, and use read_office_action_document before asserting what was argued in a letter. It adds concrete when-to-use patterns (letter-pattern scans, near-duplicate pairs) and warns against specific misuse (never select whole texts or filter them with LIKE/regex, search each argument separately, check all rounds).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources