aggregate_records
ChatGPTReturn an exact authorized count, or capped grouped buckets, for a dataset. filters must include a date range of at most 366 days. metric is count; group_by is one of none, record_type, classification, month, company, office, officer or violation_code (call get_capabilities with the dataset to see which it supports); limit caps buckets at 1-20. Buckets are ordered by count; when truncated, buckets_truncated is true and, for partitioning groupings, other_count closes the gap to total. Requires the keypedia:analytics:read scope. When the aggregate is anchored on specific companies (a company_ids filter or a company_set_id supplier list), also returns a kra summary for that cohort (tier, risk index, RED/YELLOW/GREEN counts, top-5 riskiest); none for a broad aggregate. Each result also carries KRA (KeyPedia Risk Assessment), KeyPedia's model-based risk indicator: a facility's percentile versus all scored facilities (RED = top 10%, YELLOW = top 30%, per the model's tier_cuts), dated by scored_on. Use it as default context and cite it, but it is a heuristic, not a certainty; a company shown as not_scored is NOT implied to be low-risk. KRA fields appear only when the keypedia:analytics:read scope is granted.
get_capabilities
ChatGPTDescribe what this KeyPedia connector can do for the authenticated user: the datasets it exposes (and whether each is available or planned), the filters, date fields and sort orders each dataset supports, the OAuth scopes granted, the account's plan tier (lite or premium) and whether its rate limits are shared with its organization, and the per-user rate/quota limits. Call this first to discover valid dataset values and filter names before calling search_records. Pass an optional dataset to focus the response on one dataset. Returns configuration only — never live counts or proof that a specific document exists.
get_company
ChatGPTFetch one company's public identity by company_id (from resolve_entities): name, dba, FEI/DUNS numbers, country/state/city, a canonical app URL, and record_categories — the datasets you can access that hold records for this company, each with a bounded count. Never returns contact details or uncapped related records. Also returns a kra detail: the company's tier/percentile/probability plus up to three plain-language factors (each raising or lowering risk). Each result also carries KRA (KeyPedia Risk Assessment), KeyPedia's model-based risk indicator: a facility's percentile versus all scored facilities (RED = top 10%, YELLOW = top 30%, per the model's tier_cuts), dated by scored_on. Use it as default context and cite it, but it is a heuristic, not a certainty; a company shown as not_scored is NOT implied to be low-risk. KRA fields appear only when the keypedia:analytics:read scope is granted.
get_filter_options
ChatGPTList the valid values for one filter of one dataset — the same vocabulary the dashboard pills offer. filter names a filter from get_capabilities (e.g. record_types, classifications, product_types, or an entity filter like company_ids); an optional query (<=100 chars) narrows the list; limit is 1-25. Returns items of value/label (entity filters return id/name; record-type values may carry an approximate global count). Returns configuration/vocabulary only — never contextual per-query counts.
get_record
ChatGPTFetch one record by dataset and record_id (from a search_records result's ref) in one of three views. metadata (default) returns compact metadata plus projected non-sensitive fields — never bodies, summaries, storage URLs or internal columns. content returns a bounded window of the original extracted text (text_kind original_extracted, or generated_summary — labelled, never evidence); observations returns up to five numbered observation items. content/observations require the keypedia:content:read scope and are available only for us_records; other datasets return CONTENT_UNAVAILABLE. max_chars is 1-12000 (default 6000, content/observations only). Windows carry code-point offsets and revision digests; page with cursor alone (a document change between pages returns CONTENT_CHANGED).
get_saved_search
ChatGPTFetch one saved search the user owns, or a curated topic, by id (from list_saved_searches). Returns a readable summary of its criteria (company/office/officer names, dates, record and product types, keywords), its this-week activity, the dashboard link and the share link when shared. Any criteria key the summary does not recognise is preserved verbatim under other_criteria. Requires the keypedia:saved_searches:read scope; another user's search is reported as not found. Also returns a kra snapshot (tier, risk index, scored_on, previous tier, whether risk moved). Each result also carries KRA (KeyPedia Risk Assessment), KeyPedia's model-based risk indicator: a facility's percentile versus all scored facilities (RED = top 10%, YELLOW = top 30%, per the model's tier_cuts), dated by scored_on. Use it as default context and cite it, but it is a heuristic, not a certainty; a company shown as not_scored is NOT implied to be low-risk. KRA fields appear only when the keypedia:analytics:read scope is granted.
list_saved_searches
ChatGPTList the user's own saved searches (their favorites) and, by default, KeyPedia's curated topics. Each item has its id, nickname, created time, whether it is curated (read-only) or shared (with the share link), and this week's precomputed activity counts per source with computed_at and a stale flag. Requires the keypedia:saved_searches:read scope. Reads precomputed activity only — it never recomputes, so counts may be stale (the flag says so). limit is 1-50; set include_curated=false to omit curated topics. Each item also carries a kra snapshot (tier, risk index, scored_on, previous tier and whether risk moved up/down/same). Each result also carries KRA (KeyPedia Risk Assessment), KeyPedia's model-based risk indicator: a facility's percentile versus all scored facilities (RED = top 10%, YELLOW = top 30%, per the model's tier_cuts), dated by scored_on. Use it as default context and cite it, but it is a heuristic, not a certainty; a company shown as not_scored is NOT implied to be low-risk. KRA fields appear only when the keypedia:analytics:read scope is granted.
match_companies
ChatGPTResolve a list of supplier/company names to KeyPedia companies and collect them in a server-side company set (a short id you then pass as company_set_id to search_records, aggregate_records and save_search). Pass up to 25 names per call; split a longer list and call sequentially, reusing the returned company_set_id so the set grows. If next_index is returned the call stopped early — call again with names[next_index:] and the same company_set_id before moving on. Each name returns a status (matched/ambiguous/unmatched), a confidence and up to 3 alternatives; only confident matches are added automatically. Decide ambiguous names yourself — do not ask the user about each one — and add the ones you judge correct with add_company_ids (or drop with remove_company_ids); at the end, tell the user which names you left out and why. An optional country hint applies to every name. With the keypedia:analytics:read scope each match and alternative also carries a KRA risk tier, so you can rank the supplier list by risk. Writes only your own scratch list (no KeyPedia data), and retrying a chunk is safe because the set de-duplicates. Needs keypedia:metadata:read.
resolve_entities
ChatGPTResolve a name or identifier to canonical KeyPedia entity references before filtering. kind is one of company, officer, office or violation; query is 2-100 characters; country optionally narrows companies. Returns ranked items (id, display name, a short sublabel, a canonical app URL where one exists) using the same matching the search bar's dropdown uses, plus ambiguous (true when two results share a name). Use the returned ids in search_records/aggregate_records filters. This is a directory lookup, not proof a record exists. A resolved company also carries a kra brief (tier, percentile, probability, scored_on). Each result also carries KRA (KeyPedia Risk Assessment), KeyPedia's model-based risk indicator: a facility's percentile versus all scored facilities (RED = top 10%, YELLOW = top 30%, per the model's tier_cuts), dated by scored_on. Use it as default context and cite it, but it is a heuristic, not a certainty; a company shown as not_scored is NOT implied to be low-risk. KRA fields appear only when the keypedia:analytics:read scope is granted.
run_saved_search
ChatGPTRun a saved search's stored criteria over a recent window and return what matches. id is the saved search; since (default: 7 days ago) sets the created-at window to answer 'what's new'. US FDA records come back as rows in the same compact shape as search_records, paginated with the same signed cursor (limit 1-25, page with cursor alone); every other record family returns a count plus a dashboard link. Each family passes the connector's access check first, so a family the account cannot reach is reported unavailable rather than guessed. Requires the keypedia:saved_searches:read scope. Each us_records row carries company_kra_tier, and the first page carries a kra summary for the saved search from its nightly score (top-5 riskiest only when the saved search lists specific companies). Each result also carries KRA (KeyPedia Risk Assessment), KeyPedia's model-based risk indicator: a facility's percentile versus all scored facilities (RED = top 10%, YELLOW = top 30%, per the model's tier_cuts), dated by scored_on. Use it as default context and cite it, but it is a heuristic, not a certainty; a company shown as not_scored is NOT implied to be low-risk. KRA fields appear only when the keypedia:analytics:read scope is granted.
save_search
ChatGPTSave a search to the user's KeyPedia account from connector filters, so it opens normally in the app. This CHANGES THE USER'S ACCOUNT — confirm with the user before calling. Takes the same filter shape as search_records (including company_set_id for a supplier list); any filter with no saved-search equivalent is rejected by name. mode is single (one saved search holding every company, needs a nickname) or individual (one auto-named saved search per company in the set, chunked by start/chunk_size). When the user asks to save a list, first call with preview: true for BOTH modes, show them the single option and the individual option (with its 2-4 example names), WAIT for their choice, then save. A single preview needs no nickname (a suggested default name is shown); a real single save does. For individual, loop chunk by chunk with the returned next_start until it is null, and echo the returned set_version on every chunk; if it is rejected the set changed — restart from start=0 (duplicates are skipped). If stopped_reason is SAVED_SEARCH_WRITE_CAP the daily cap was hit (resume later from next_start); TEMPORARILY_UNAVAILABLE means retry shortly. An identical existing search is returned/skipped, never duplicated. Requires the keypedia:saved_searches:write scope (never granted by default) and operator-enabled writes.
search_document_content
ChatGPTSearch inside us_records document bodies for literal keyword terms and return exact, verifiable quotes with provenance. Requires the keypedia:content:read scope. Provide a query (1-10 literal terms) and optionally either filters or record_ids (1-5, mutually exclusive) to scope the candidate set. Returns up to limit (1-5, default 3) passages, each an exact substring of the original text with a character-range locator, source/content revision digests and a canonical app URL; candidates that match only a generated field appear as non_evidence_matches (no text). Coverage flags (examined, has_more_candidates/passages, candidate_window_exhausted, search_complete) report scan completeness honestly; page with cursor alone. Only us_records carries body text in this version; other datasets return CONTENT_UNAVAILABLE.
search_records
ChatGPTSearch regulatory records in a KeyPedia dataset and return compact metadata (title, type, dates, company/office, source identifiers, a canonical app URL, whether document content is available). Every dashboard dataset is available (US FDA records/inspections/guidances, EMA, Canada, Brazil, China, UK MHRA, Orange Book, EAEU, US state boards). Call get_capabilities with a dataset first to learn its exact filters, date fields, sort orders and source keys. Provide a query (1-10 literal keyword terms) and/or filters (entity IDs, record/product types, a date range, a dataset-specific source object), and a sort of newest, oldest, or relevance (relevance requires a query and is only available where the dataset advertises it). limit is 1-25 (default 10). To page, call again with cursor alone — never combined with other arguments. Results are permission-filtered to what the user may see. Each row carries company_kra_tier. When the search is anchored on specific companies (a company_ids filter or a company_set_id supplier list), the first page also carries a kra summary for that cohort (tier, risk index, RED/YELLOW/GREEN counts and the top-5 riskiest companies); a broad search (keyword or date only) returns no summary — read the per-row company_kra_tier, or narrow by companies for a cohort score. Each result also carries KRA (KeyPedia Risk Assessment), KeyPedia's model-based risk indicator: a facility's percentile versus all scored facilities (RED = top 10%, YELLOW = top 30%, per the model's tier_cuts), dated by scored_on. Use it as default context and cite it, but it is a heuristic, not a certainty; a company shown as not_scored is NOT implied to be low-risk. KRA fields appear only when the keypedia:analytics:read scope is granted.
share_saved_search
ChatGPTTurn on sharing for one of the user's saved searches and return its stable share link. This CHANGES THE USER'S ACCOUNT — confirm with the user before calling. Pass exactly one of id (an existing saved search) or filters+nickname (saved first, then shared, as the app does). Re-sharing returns the same link. Curated topics cannot be shared and another user's search is reported as not found. Requires the keypedia:saved_searches:write scope (never granted by default) and operator-enabled writes.
aggregate_records
Claudeget_capabilities
Claudeget_company
Claudeget_filter_options
Claudeget_record
Claudeget_saved_search
Claudelist_saved_searches
Claudematch_companies
Clauderesolve_entities
Clauderun_saved_search
Claudesave_search
Claudesearch_document_content
Claudesearch_records
Claudeshare_saved_search
Claude