Skip to main content
Glama

List Objects

list_objects
Read-only

Browse records of one type page by page, optionally filtered or sorted, to find a Gramps ID, list a source's citations, or apply Gramps filter rules.

Instructions

List the records of one type a page at a time, optionally filtered and sorted: one line per record (Gramps ID, summary, handle) with the page and total count. Use it to browse a type, fetch one Gramps ID, list a source's citations (sourceHandle), or filter with Gramps filter rules (rules): by field values with the MatchesQuery rule, or by relationships, such as a person's ancestors or people with no family links. To find records by text use search; to read one record in full use get_object. gql, the older field filter, works only before Gramps Web API 3.26 and must match as well as rules; grampsId cannot be combined with rules. Filtering runs on the Gramps Web server: invalid rules are explained, invalid gql returns its error, and an ID, tag or saved filter the tree lacks matches nothing instead of failing.

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": {
      "objectType": "<objectType>"
    },
    "name": "list_objects"
  }
}

Input Schema

NameRequiredDescriptionDefault
gqlNoFilter in Gramps Query Language, run on the server; only before Gramps Web API 3.26, which removed it (use the MatchesQuery rule in rules instead): field = value with a single = (not ==), also !=, <, <=, >, >=, ~ (contains), !~, and, or and parentheses; text goes in double quotes. Types are numbers, not names, e.g. event type.value = 12 Birth, 13 Death, 1 Marriage, 15 Baptism, 19 Burial. Examples: gender = 1 (male), primary_name.first_name = "Anna", media_list.length >= 1 (optional).
pageNoPage number, from 1 (default 1).
sortNoField to sort by, e.g. gramps_id; a leading - sorts descending, e.g. -change for latest edits first (optional).
rulesNoGramps filter rules, run on the server (with gql a record must match both): {"function": "and" (default), "or" or "one", "invert": true to keep the records that do not match, "rules": [{"name": rule, "values": [one per label of the rule, in order]}]}, or just the array of rules. Values are Gramps IDs (I0001), text, numbers or true/false. An item of rules can be a nested filter of the same form; with "namespace" (Event, Family, Person, Place, Source or Repository) it matches the records each listed one links to, e.g. people by their events. Examples: people with no family links {"rules": [{"name": "Disconnected"}]}; people not related to I0001 {"invert": true, "rules": [{"name": "IsRelatedWith", "values": ["I0001"]}]}; a saved filter {"name": "MatchesFilter", "values": ["its name"]}. Field values (Gramps Web API 3.23+): MatchesQuery with a Python-like GOQL expression, == for equals, text in single quotes, len(list) for a list's length, e.g. {"name": "MatchesQuery", "values": ["primary_name.first_name == 'Anna' and len(media_list) >= 1"]}; events of a type: type.value == EventType.BIRTH. Rules of each type and their values: get_reference(topic: "filter-rules", section: type). Not for tags (optional).
grampsIdNoOnly the record with this Gramps ID, e.g. I0001 (not a handle; optional).
pagesizeNoRecords per page, 1–100 (default 20).
objectTypeYesWhich records to list: people, families, events, places, sources, citations, repositories, notes, media or tags.
sourceHandleNoWith objectType citations only: list just the citations of this source; combined with rules and gql by and (optional). Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.11.1
    • changedInput schema / properties / gql / description
      Previous value: -"Filter in Gramps Query Language, run on the server: field = value with a single = (not ==), also !=, <, <=, >, >=, ~ (contains), !~, and, or and parentheses; text goes in double quotes. Types are numbers, not names, e.g. event type.value = 12 Birth, 13 Death, 1 Marriage, 15 Baptism, 19 Burial. Examples: gender = 1 (male), primary_name.first_name = \"Anna\", media_list.length >= 1 (optional)."New value: +"Filter in Gramps Query Language, run on the server; only before Gramps Web API 3.26, which removed it (use the MatchesQuery rule in rules instead): field = value with a single = (not ==), also !=, <, <=, >, >=, ~ (contains), !~, and, or and parentheses; text goes in double quotes. Types are numbers, not names, e.g. event type.value = 12 Birth, 13 Death, 1 Marriage, 15 Baptism, 19 Burial. Examples: gender = 1 (male), primary_name.first_name = \"Anna\", media_list.length >= 1 (optional)."
    • changedInput schema / properties / rules / description
      Previous value: -"Gramps filter rules, run on the server before gql (a record must match both): {\"function\": \"and\" (default), \"or\" or \"one\", \"invert\": true to keep the records that do not match, \"rules\": [{\"name\": rule, \"values\": [one per label of the rule, in order]}]}, or just the array of rules. Values are Gramps IDs (I0001), text, numbers or true/false. An item of rules can be a nested filter of the same form; with \"namespace\" (Event, Family, Person, Place, Source or Repository) it matches the records each listed one links to, e.g. people by their events. Examples: people with no family links {\"rules\": [{\"name\": \"Disconnected\"}]}; people not related to I0001 {\"invert\": true, \"rules\": [{\"name\": \"IsRelatedWith\", \"values\": [\"I0001\"]}]}; a saved filter {\"name\": \"MatchesFilter\", \"values\": [\"its name\"]}. Rules of each type and their values: get_reference(topic: \"filter-rules\", section: type). Not for tags (optional)."New value: +"Gramps filter rules, run on the server (with gql a record must match both): {\"function\": \"and\" (default), \"or\" or \"one\", \"invert\": true to keep the records that do not match, \"rules\": [{\"name\": rule, \"values\": [one per label of the rule, in order]}]}, or just the array of rules. Values are Gramps IDs (I0001), text, numbers or true/false. An item of rules can be a nested filter of the same form; with \"namespace\" (Event, Family, Person, Place, Source or Repository) it matches the records each listed one links to, e.g. people by their events. Examples: people with no family links {\"rules\": [{\"name\": \"Disconnected\"}]}; people not related to I0001 {\"invert\": true, \"rules\": [{\"name\": \"IsRelatedWith\", \"values\": [\"I0001\"]}]}; a saved filter {\"name\": \"MatchesFilter\", \"values\": [\"its name\"]}. Field values (Gramps Web API 3.23+): MatchesQuery with a Python-like GOQL expression, == for equals, text in single quotes, len(list) for a list's length, e.g. {\"name\": \"MatchesQuery\", \"values\": [\"primary_name.first_name == 'Anna' and len(media_list) >= 1\"]}; events of a type: type.value == EventType.BIRTH. Rules of each type and their values: get_reference(topic: \"filter-rules\", section: type). Not for tags (optional)."
    • changedInput schema / properties / sourceHandle / description
      Previous value: -"With objectType citations only: list just the citations of this source; combined with gql by and (optional). Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects."New value: +"With objectType citations only: list just the citations of this source; combined with rules and gql by and (optional). Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects."
  2. Changed1 schema field changedv2.8.0
    • changedInput schema / properties / gql / description
      Previous value: -"Filter in Gramps Query Language, run on the server, e.g. gender == 1 or media_list.length >= 1 (optional)."New value: +"Filter in Gramps Query Language, run on the server: field = value with a single = (not ==), also !=, <, <=, >, >=, ~ (contains), !~, and, or and parentheses; text goes in double quotes. Types are numbers, not names, e.g. event type.value = 12 Birth, 13 Death, 1 Marriage, 15 Baptism, 19 Burial. Examples: gender = 1 (male), primary_name.first_name = \"Anna\", media_list.length >= 1 (optional)."
  3. Changed1 schema field changedv2.6.0
    • addedInput schema / properties / rules
      Added value: +{
      +  "default": null,
      +  "description": "Gramps filter rules, run on the server before gql (a record must match both): {\"function\": \"and\" (default), \"or\" or \"one\", \"invert\": true to keep the records that do not match, \"rules\": [{\"name\": rule, \"values\": [one per label of the rule, in order]}]}, or just the array of rules. Values are Gramps IDs (I0001), text, numbers or true/false. An item of rules can be a nested filter of the same form; with \"namespace\" (Event, Family, Person, Place, Source or Repository) it matches the records each listed one links to, e.g. people by their events. Examples: people with no family links {\"rules\": [{\"name\": \"Disconnected\"}]}; people not related to I0001 {\"invert\": true, \"rules\": [{\"name\": \"IsRelatedWith\", \"values\": [\"I0001\"]}]}; a saved filter {\"name\": \"MatchesFilter\", \"values\": [\"its name\"]}. Rules of each type and their values: get_reference(topic: \"filter-rules\", section: type). Not for tags (optional)."
      +}
  4. Changed7 schema fields changedv2.3.0
    • changedInput schema / properties / gql / description
      Previous value: -"Optional. Gramps QL expression executed server-side for filtering."New value: +"Filter in Gramps Query Language, run on the server, e.g. gender == 1 or media_list.length >= 1 (optional)."
    • changedInput schema / properties / grampsId / description
      Previous value: -"Optional. Filter by numeric/string Gramps ID (I0001-style), NOT the opaque handle."New value: +"Only the record with this Gramps ID, e.g. I0001 (not a handle; optional)."
    • changedInput schema / properties / objectType / description
      Previous value: -"Object collection: people | families | events | places | sources | citations | repositories | notes | media | tags (exact spelling, case-insensitive)."New value: +"Which records to list: people, families, events, places, sources, citations, repositories, notes, media or tags."
    • changedInput schema / properties / page / description
      Previous value: -"1-based page. Default 1."New value: +"Page number, from 1 (default 1)."
    • changedInput schema / properties / pagesize / description
      Previous value: -"Page size. Default 20, max 100."New value: +"Records per page, 1–100 (default 20)."
    • changedInput schema / properties / sort / description
      Previous value: -"Optional. Sort field; leading - means descending."New value: +"Field to sort by, e.g. gramps_id; a leading - sorts descending, e.g. -change for latest edits first (optional)."
    • changedInput schema / properties / sourceHandle / description
      Previous value: -"Optional. When objectType is citations, limit to citations of this source handle. Handle or Gramps ID (e.g. I0001). Handles are opaque strings from the API. Gramps IDs (like I0001, F0023) are auto-resolved to handles. Find handles with search() or list_objects()."New value: +"With objectType citations only: list just the citations of this source; combined with gql by and (optional). Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects."
  5. First observedv2.2.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already establish read-only, non-destructive, non-open-world behavior. The description adds server-side filtering behavior, version compatibility for gql, pagination, and failure modes for invalid rules, invalid gql, and missing IDs/tags/filters.

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

Conciseness4/5

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

The description is dense but front-loaded, and every sentence carries operational detail justified by eight parameters and complex Gramps filters. Some long compound sentences could be split for readability, but there is no filler.

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?

Given no output schema and eight parameters, it covers what the tool returns, its filtering model, alternatives, and failure modes. Nothing material is missing for correct invocation.

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%, so the schema already documents most fields. The description still adds cross-parameter constraints and semantics, especially "must match both" for gql and rules and the sourceHandle/rules/gql combination, though it adds little for page and pagesize.

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?

The description opens with a specific verb and resource ("List the records of one type") and states the page-shaped output and supported filters, so it is clearly distinguishable from a full-record reader or a text search.

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?

It explicitly routes browsing to this tool and names "search" for text and "get_object" for full records. It also lists concrete use cases (sourceHandle, grampsId, rules) and warns about incompatible combinations such as grampsId with rules.

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