Skip to main content
Glama
ianderso
by ianderso

create_filter

Save a reusable custom filter from Gramps rules so repeated selections get a name and can be applied again without retyping rules each time.

Instructions

Save a reusable custom filter built from Gramps' own rules.

Worth doing for a selection you will run repeatedly — an audit scope, a branch of the tree — because the filter then has a name rather than being retyped each time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesFilter name, used to apply it later.
rulesYesRules, each {'name': <rule>, 'values': [...], 'regex': false}. Rule names come from list_filter_rules.
invertNoReturn everything the rules do NOT match.
commentNoNote on the filter's purpose.
functionNoHow rules combine: 'and', 'or', or 'one'.and
namespaceYesSingular, capitalised: Person, Family, Event, Place, Citation, Source, Repository, Media, Note.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare the safety profile (readOnlyHint=false, destructiveHint=false, non-idempotent), so the bar is lowered. The description adds the value proposition of naming a filter for reuse but says nothing about name collisions, persistence scope, or failure modes for a write operation.

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?

Two sentences with the action front-loaded ('Save a reusable custom filter'), and the second sentence earns its place by justifying the tool's existence. Slightly wordy but no waste.

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 create tool with no output schema, 100% schema coverage and annotations carry most of the burden; the description adds the motivating rationale. It is nearly complete, only missing a pointer to list_filter_rules for valid rule names.

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 description coverage is 100%, so the schema already documents all six parameters including the namespace enum-like list and rule structure. The description adds no parameter syntax or format detail beyond what the schema provides, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: 'Save a reusable custom filter' built from Gramps rules. Clear what it does, but it never names the sibling tools (list_custom_filters, delete_filter) that would let an agent place it in the filter lifecycle without opening schemas.

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?

Gives a motivating condition — 'a selection you will run repeatedly — an audit scope, a branch of the tree' — which implies usage context. However it names no alternatives and no prerequisites; it does not say that rule names must first come from list_filter_rules or how this differs from simply querying.

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