Run Register Query
run_register_queryRuns 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
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One read-only SELECT (or WITH … SELECT) against markus_research views only. No semicolons, no writes, no other schemas. | |
| question_summary | Yes | Plain-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. |