Skip to main content
Glama

list_article

Retrieve Article instances using filters, search terms, ordering, and pagination to locate specific records.

Instructions

List Article instances with filtering, searching, ordering, and pagination.

Filter lookups: field (exact), field__iexact, field__contains, field__icontains, field__startswith, field__istartswith, field__endswith, field__iendswith, field__gt, field__gte, field__lt, field__lte, field__in, field__range, field__isnull; date fields also take field__year, field__month, field__day (and field__date on datetimes), optionally followed by a comparison (field__year__gte). Relation paths (e.g. category__slug) and custom filter parameters work only when the admin declares them in list_filter / date_hierarchy: describe_article lists them under admin_config.filters. Invalid filters return an error.

Available fields:

  • id (BigAutoField)

  • title (CharField) [required]

  • content (TextField) [required]

  • author (ForeignKey) [required]

  • published_date (DateTimeField)

  • is_published (BooleanField)

  • created_at (DateTimeField)

  • updated_at (DateTimeField)

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of items to return (default: 100)
offsetNoNumber of items to skip (default: 0)
searchNoSearch term to match against searchable fields
filtersNoFilter criteria. Keys are field names with optional lookups (e.g., {'status': 'published', 'created_at__gte': '2024-01-01'}), or filter names listed by describe under admin_config.filters
order_byNoFields to order by. Prefix with '-' for descending (e.g., ['-created_at', 'title'])

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that invalid filters return an error and that relation-path/custom filters require admin declaration, which is real constraint information beyond the schema. However, it omits any statement about read-only safety, permissions, or side effects for a list 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?

Purpose is front-loaded in sentence one, followed by clearly delimited blocks for lookups and fields. The dense lookup enumeration is long but each item is functional rather than filler, so the length is largely earned.

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 complex filtered-list tool this covers filtering, searching, ordering, and pagination constraints thoroughly. The gap is the absence of any output-shape description (no output schema exists), so an agent cannot anticipate the response structure or whether a total count is returned.

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 already 100%, so the baseline is 3, but the description substantially enriches it: it enumerates the full lookup vocabulary (exact, iexact, contains, gt/gte/lt/lte, in, range, isnull, date parts) and lists every available field with type and required status. That materially exceeds what the schema's generic parameter descriptions provide for filters and order_by.

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 opening sentence states a specific verb (List) plus resource (Article instances) and enumerates the four supported capabilities (filtering, searching, ordering, pagination). This cleanly separates it from siblings like get_article (single fetch), create_article, and describe_article (schema/config inspection), and it even cross-references describe_article for filter discovery.

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

Usage Guidelines4/5

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

The description gives clear operational context: relation paths and custom filters only work when declared, and describe_article should be consulted to discover admin_config.filters. That is genuine how/when guidance, but it never explicitly contrasts this tool with alternatives like find_models or autocomplete_article for the same resource.

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