Skip to main content
Glama
paulieb89

What Do They Know

get_request_feed_items

Read-onlyIdempotent

Retrieve parsed Atom feed entries for a specific FOI request, with structured fields and links to full details.

Instructions

Return parsed Atom feed entries for a specific FOI request as structured objects.

Use this instead of reading the raw wdtk://requests/{slug}/feed resource when you want structured AtomEntry objects rather than raw XML. Each entry's link field contains the request URL; use the slug from that URL with request_json or authority_json for full detail.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
request_slugYes
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The actual handler function for get_request_feed_items. It fetches the Atom feed for a given request_slug, parses it into structured AtomEntry objects, and returns up to `limit` items.
    async def get_request_feed_items(
        request_slug: str,
        limit: int = 20,
        ctx: Context = CurrentContext(),
    ) -> list[AtomEntry]:
        """Return parsed Atom feed entries for a specific FOI request as structured objects.
    
        Use this instead of reading the raw wdtk://requests/{slug}/feed resource when you
        want structured AtomEntry objects rather than raw XML. Each entry's `link` field
        contains the request URL; use the slug from that URL with request_json or
        authority_json for full detail."""
        await ctx.info(f"Parsing request feed for: {request_slug}")
        xml_text = await wdtk.get_text(
            f"/request/{request_slug}/feed",
            accept="application/atom+xml, application/xml;q=0.9, */*;q=0.1",
        )
        items = parse_atom(xml_text)
        return items[:limit]
  • server.py:276-283 (registration)
    MCP tool registration decorator for get_request_feed_items, marking it as read-only, idempotent, and tagged with 'public' and 'feed'.
    @mcp.tool(
        annotations=ToolAnnotations(
            readOnlyHint=True,
            idempotentHint=True,
            openWorldHint=True,
        ),
        tags={"public", "feed"},
    )
  • AtomEntry Pydantic model that serves as the return type / output schema for get_request_feed_items.
    class AtomEntry(BaseModel):
        id: str | None = None
        title: str | None = None
        link: str | None = None
        updated: str | None = None
        summary: str | None = None
  • parse_atom helper function that converts raw XML Atom feed text into a list of AtomEntry objects. Called by get_request_feed_items to parse the feed response.
    def parse_atom(xml_text: str) -> list[AtomEntry]:
        ns = {"atom": "http://www.w3.org/2005/Atom"}
        root = ET.fromstring(xml_text)
        entries: list[AtomEntry] = []
    
        for entry in root.findall("atom:entry", ns):
            link_el = entry.find("atom:link", ns)
            summary_el = entry.find("atom:summary", ns)
            entries.append(
                AtomEntry(
                    id=(entry.findtext("atom:id", default=None, namespaces=ns)),
                    title=(entry.findtext("atom:title", default=None, namespaces=ns)),
                    link=(link_el.get("href") if link_el is not None else None),
                    updated=(entry.findtext("atom:updated", default=None, namespaces=ns)),
                    summary=("".join(summary_el.itertext()).strip() if summary_el is not None else None),
                )
            )
    
        return entries
  • Smoke test probe that invokes get_request_feed_items during testing to verify the tool works correctly.
    Probe(
        tool="get_request_feed_items",
        args={"request_slug": "a_request_about_facial_recogni", "limit": 20},
        note="Feed items — known active request; error expected if slug stale",
Behavior4/5

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

Annotations already indicate readOnly, idempotent, and openWorld hints. The description adds context by stating the output is structured AtomEntry objects and that the link field can be used for further detail, which is consistent and adds value beyond the annotations.

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

Conciseness5/5

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

The description is two highly efficient sentences. The first sentence states the purpose clearly, and the second provides usage guidance and a follow-up hint. No redundant words, and the key information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers purpose, usage context, and output hints, but lacks explanation of the 'limit' parameter and any pagination or sorting behavior. Given the presence of an output schema, the description is moderately complete but not fully for a 2-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%. The description implicitly covers the required 'request_slug' parameter by mentioning 'for a specific FOI request', but it does not describe the 'limit' parameter at all, leaving a significant gap in understanding for the agent.

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?

The description clearly states the tool returns parsed Atom feed entries for a specific FOI request as structured objects, with a specific verb and resource. It distinguishes from reading raw XML but does not explicitly differentiate from sibling tools, though the purpose is specific enough.

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 explicitly says to use this tool instead of reading the raw feed resource when structured objects are desired. It also suggests follow-up actions with the link field. However, it does not provide exclusions or compare to sibling tools, but the guidance is clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/paulieb89/whatdotheyknow-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server