Skip to main content
Glama

list_official_packages

List all official Flet extension packages to discover extra capabilities beyond the core library.

Instructions

Get a list of all official Flet extension packages (e.g. flet-audio, flet-video). Use this to see what official extra capabilities Flet supports outside the core library.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool handler for list_official_packages - an async function decorated with @mcp.tool() that delegates to pkg_fetcher.list_official_packages()
    @mcp.tool()
    async def list_official_packages() -> list[str]:
        """
        Get a list of all official Flet extension packages (e.g. flet-audio, flet-video).
        Use this to see what official extra capabilities Flet supports outside the core library.
        """
        return await pkg_fetcher.list_official_packages()
  • The actual implementation of list_official_packages in FletPackageFetcher class - fetches official Flet extension packages from the GitHub API (flet-dev/flet monorepo), with a fallback list of known packages
    async def list_official_packages(self) -> list[str]:
        """Scrapes the Flet monorepo to find all official extensions."""
        url = "https://api.github.com/repos/flet-dev/flet/git/trees/main?recursive=1"
        data = await self._fetch_json(url, headers=self.github_headers)
        
        if not data or "tree" not in data:
            return self._FALLBACK_OFFICIAL 
    
        packages = []
        for item in data["tree"]:
            path = item["path"]
            if path.startswith("sdk/python/packages/") and item["type"] == "tree":
                parts = path.split("/")
                if len(parts) == 4: 
                    packages.append(parts[3])
                    
        return sorted(list(set(packages))) if packages else self._FALLBACK_OFFICIAL
  • Fallback list of official Flet packages used when the GitHub API call fails
    _FALLBACK_OFFICIAL = [
        "flet-ads", "flet-audio", "flet-audio-recorder", "flet-camera",
        "flet-charts", "flet-code-editor", "flet-color-pickers", "flet-datatable2",
        "flet-flashlight", "flet-geolocator", "flet-lottie", "flet-map",
        "flet-permission-handler", "flet-rive", "flet-secure-storage",
        "flet-video", "flet-webview"
    ]
  • Helper method _fetch_json used to make cached HTTP requests to GitHub API
    async def _fetch_json(self, url: str, headers: dict | None = None) -> dict | None:
        if url in cache:
            return cache[url]
        try:
            response = await self.client.get(url, headers=headers)
            if response.status_code == 200:
                data = response.json()
                cache.set(url, data, expire=86400)
                return data
        except Exception:
            pass
  • Tool registration via @mcp.tool() decorator on the list_official_packages function in server.py
    @mcp.tool()
    async def list_official_packages() -> list[str]:
        """
        Get a list of all official Flet extension packages (e.g. flet-audio, flet-video).
        Use this to see what official extra capabilities Flet supports outside the core library.
        """
        return await pkg_fetcher.list_official_packages()
Behavior3/5

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

No annotations are provided, so the description carries full burden. It implies a read-only list operation, which is safe, but it does not disclose details like whether the list is cached, sorted, or paginated. The description is adequate for a simple tool but lacks depth.

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 sentences, front-loading the core action and purpose. Every word contributes value—no filler, no repetition.

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 the tool's simplicity (no parameters, straightforward output), the description is fully complete. It tells the agent what the tool does and when to use it. The output schema exists but is not described, which is acceptable per the rubric.

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?

The tool has zero parameters, and the input schema is fully covered (100%). Per guidelines, this earns a baseline of 4. The description does not add information about parameters, but 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 ('Get a list') and resource ('official Flet extension packages') with concrete examples like flet-audio, flet-video. It uniquely identifies the tool's purpose among siblings (e.g., get_package_details, list_flet_controls), establishing clear differentiation.

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 second sentence explicitly states the use case: 'Use this to see what official extra capabilities Flet supports outside the core library.' This provides clear context. While it doesn't mention when not to use or alternatives, the simplicity of the tool makes exclusion guidance unnecessary.

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/Nwokike/flet-mcp-server'

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