Skip to main content
Glama

list_policies

Retrieve a complete list of Apache Software Foundation policy documents, organized by section for quick reference.

Instructions

List all available ASF policy documents organised by section.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The actual handler function for list_policies tool. Decorated with @mcp.tool(), it loads the cache, groups policies by section from POLICY_SOURCES, and returns a formatted markdown string listing each policy with its cache age or 'not yet fetched' status.
    @mcp.tool()
    def list_policies() -> str:
        """List all available ASF policy documents organised by section."""
        cache = fetcher.load_cache()
        by_section: dict[str, list[tuple[str, dict[str, str]]]] = {}
        for key, meta in POLICY_SOURCES.items():
            by_section.setdefault(meta["section"], []).append((key, meta))
    
        lines = ["# ASF Policy Documents\n"]
        for section, items in by_section.items():
            lines.append(f"## {section}")
            for key, meta in items:
                entry: dict[str, Any] = cache.get(key, {})
                if entry.get("text"):
                    age_h = int((time.time() - float(entry.get("fetched_at", 0))) // 3600)
                    age = f" — cached {age_h}h ago"
                else:
                    age = " — not yet fetched"
                lines.append(f"- **`{key}`**: {meta['title']}{age}")
                lines.append(f"  {meta['description']}")
                lines.append(f"  <{meta['url']}>")
            lines.append("")
        return "\n".join(lines)
  • The MCP server instance created via FastMCP('asf-policy'). The @mcp.tool() decorator on line 17 registers list_policies as a tool with this server instance.
    mcp = FastMCP("asf-policy")
  • POLICY_SOURCES dict defines all policy keys that list_policies uses — these keys are the 'valid policy keys' the tool lists. Each entry has title, url, section, and description.
    POLICY_SOURCES: dict[str, dict[str, str]] = {
        "pmc": {
            "title": "PMC Guide (Mailing Lists, Committers, PMC Members)",
            "url": "https://www.apache.org/dev/pmc.html",
            "section": "Community And Project Oversight",
            "description": "Rules for mailing lists, adding committers, and managing PMC membership",
        },
        "project_independence": {
            "title": "Project Independence",
            "url": "https://community.apache.org/projectIndependence.html",
            "section": "Independence",
            "description": "Guidelines for operating independently and for the public good",
        },
        "board_reporting": {
            "title": "Board Reporting Requirements",
            "url": "https://www.apache.org/foundation/board/reporting",
            "section": "Reporting",
            "description": "Quarterly board status report requirements for PMCs",
        },
        "release_policy": {
            "title": "Release Policy",
            "url": "https://www.apache.org/legal/release-policy",
            "section": "Release",
            "description": "Apache software release policy - what constitutes a valid release",
        },
        "voting": {
            "title": "Apache Voting Process",
            "url": "https://www.apache.org/foundation/voting.html",
            "section": "Release",
            "description": "Apache voting process for releases and other decisions",
        },
        "release_distribution": {
            "title": "Release Distribution Policy",
            "url": "https://www.apache.org/dev/release-distribution",
            "section": "Release",
            "description": "Policy for how and where Apache releases are distributed",
        },
        "security": {
            "title": "Security Team Guidance",
            "url": "https://www.apache.org/security/",
            "section": "Security",
            "description": "Security notification and disclosure procedures",
        },
        "security_committers": {
            "title": "Vulnerability Handling for Committers",
            "url": "https://www.apache.org/security/committers.html",
            "section": "Security",
            "description": "How committers should handle reported security vulnerabilities",
        },
        "licenses": {
            "title": "Contributor License Agreements (CLAs)",
            "url": "https://www.apache.org/licenses/",
            "section": "Licensing",
            "description": "CLA requirements and Apache license versions",
        },
        "source_headers": {
            "title": "Apache Source Headers",
            "url": "https://www.apache.org/legal/src-headers.html",
            "section": "Licensing",
            "description": "Required Apache license headers in source files",
        },
        "resolved_licenses": {
            "title": "Approved/Resolved Third-Party Licenses",
            "url": "https://www.apache.org/legal/resolved.html",
            "section": "Licensing",
            "description": "Which third-party licenses are Category A (allowed), B (limited), or X (forbidden)",
        },
        "branding": {
            "title": "Project Branding Requirements",
            "url": "https://www.apache.org/foundation/marks/pmcs",
            "section": "Branding",
            "description": "Trademark and branding requirements for PMC projects",
        },
        "trademark_maintenance": {
            "title": "Trademark Maintenance Responsibilities",
            "url": "https://www.apache.org/foundation/marks/responsibility.html",
            "section": "Branding",
            "description": "PMC responsibilities for maintaining Apache trademarks",
        },
        "website_linking": {
            "title": "Website Linking Policy",
            "url": "https://www.apache.org/foundation/marks/linking",
            "section": "Branding",
            "description": "Policy on linking to and from Apache project websites",
        },
        "repo_policy": {
            "title": "Repository Policy",
            "url": "https://infra.apache.org/project-repo-policy.html",
            "section": "Infrastructure",
            "description": "Policy for project source code repositories",
        },
        "website_policy": {
            "title": "Website Policy",
            "url": "https://infra.apache.org/project-site-policy.html",
            "section": "Infrastructure",
            "description": "Policy for project websites and hosting",
        },
        "press": {
            "title": "Press & Marketing Policy",
            "url": "https://www.apache.org/press/",
            "section": "Press",
            "description": "Guidelines for press releases and marketing coordination",
        },
        "sponsorship": {
            "title": "Sponsorship Requirements",
            "url": "https://www.apache.org/foundation/sponsorship.html",
            "section": "Fundraising",
            "description": "Fundraising and sponsorship policies",
        },
        "privacy": {
            "title": "Privacy Policy",
            "url": "https://privacy.apache.org/policies/privacy-policy-public.html",
            "section": "Privacy",
            "description": "ASF privacy policy",
        },
        "incubator": {
            "title": "Incubator Podling Policies",
            "url": "https://incubator.apache.org/policy/incubation.html",
            "section": "Incubator",
            "description": "Policies governing Apache Incubator podlings",
        },
    }
  • load_cache() helper used by list_policies to read the on-disk JSON cache to determine whether each policy has been fetched and how old it is.
    def load_cache() -> dict[str, Any]:
        """Load the on-disk JSON cache, returning an empty dict on any error."""
        if CACHE_FILE.exists():
            try:
                return json.loads(CACHE_FILE.read_text(encoding="utf-8"))  # type: ignore[no-any-return]
            except Exception:
                pass
        return {}
Behavior3/5

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

With no annotations, the description carries the full burden. It states the tool lists all policies organized by section, which is transparent enough for a simple read operation. However, it does not disclose potential pagination, rate limits, or data volume, which could be relevant for an agent.

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 a single sentence with no filler. Every word adds value: 'list all available' sets scope, 'ASF policy documents' identifies the resource, 'organised by section' provides structure. It is optimally concise.

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 zero parameters and the presence of an output schema, the description is complete. It tells the agent what the tool does (list all policies by section) and nothing more is needed for correct invocation. Sibling tools provide additional context for differentiation.

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?

There are zero parameters, and the input schema coverage is 100% (empty). According to guidelines, the baseline score is 4 when no parameters exist. The description adds no param info because none are needed.

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 uses a specific verb 'List' and clearly identifies the resource as 'all available ASF policy documents'. It also adds organization detail 'by section', which differentiates it from siblings like 'get_policy' (single document) and 'search_policies' (filtered search).

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?

The description implies when to use the tool (when you need all policies organized by section) but provides no explicit guidance on when not to use it or alternatives. Given sibling names, context is inferred but not stated, so the score is neutral.

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/justinmclean/PolicyMCP'

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