Skip to main content
Glama

get_queryables

Retrieve queryable properties for STAC collections to enable filtering of geospatial datasets by spatial, temporal, and attribute parameters.

Instructions

Get the queryable properties for a specific STAC collection by its ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collection_idYes
catalog_urlNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core handler function that executes the get_queryables tool logic: fetches queryables from STACClient and formats as preview text or JSON.
    def handle_get_queryables(
        client: STACClient,
        arguments: dict[str, Any],
    ) -> list[TextContent] | dict[str, Any]:
        collection_id = arguments.get("collection_id")
        data = client.get_queryables(collection_id=collection_id)
        if arguments.get("output_format") == "json":
            return {"type": "queryables", **data}
        props = data.get("queryables", {})
        result_text = "**Queryables**\n\n"
        if not props:
            result_text += data.get("message", "No queryables available") + "\n"
            return [TextContent(type="text", text=result_text)]
        result_text += f"Collection: {collection_id or 'GLOBAL'}\n"
        result_text += f"Count: {len(props)}\n\n"
        for name, spec in list(props.items())[:PREVIEW_LIMIT]:
            typ = spec.get("type", "unknown") if isinstance(spec, dict) else "unknown"
            result_text += f"  - {name}: {typ}\n"
        if len(props) > PREVIEW_LIMIT:
            result_text += f"  ... and {len(props) - PREVIEW_LIMIT} more\n"
        return [TextContent(type="text", text=result_text)]
  • JSON schema and prompt definition for the get_queryables tool, specifying input parameters (collection_id optional string).
    @app.prompt(
        name="tool_get_queryables_prompt",
        description="Usage for get_queryables tool",
        meta={
            "schema": {
                "type": "object",
                "properties": {
                    "collection_id": {"type": "string"},
                    "catalog_url": {"type": "string"},
                },
                "required": [],
            },
            "example": {"collection_id": "my-collection"},
        },
    )
    def _prompt_get_queryables() -> PromptMessage:
        schema = {
            "type": "object",
            "properties": {
                "collection_id": {"type": "string"},
                "catalog_url": {"type": "string"},
            },
            "required": [],
        }
        payload = {
            "name": "get_queryables",
            "description": "Fetch STAC API (or collection) queryables.",
            "parameters": schema,
            "example": {"collection_id": "my-collection"},
        }
        human = (
            f"Tool: get_queryables\nDescription: {payload['description']}\n\n"
            "Parameters:\n"
            f"{json.dumps(schema, indent=2)}\n\n"
            "Example:\n"
            f"{json.dumps(payload['example'], indent=2)}"
        )
        return PromptMessage(
            role="user",
            content=TextContent(type="text", text=human),
            _meta={"machine_payload": payload},
        )
  • Primary MCP server registration of the get_queryables tool using FastMCP @app.tool decorator, dispatching to execution layer.
    @app.tool
    async def get_queryables(
        collection_id: list[str],
        catalog_url: str | None = None,
    ) -> list[dict[str, Any]]:
        """Get the queryable properties for a specific STAC collection by its ID."""
        return await execution.execute_tool(
            "get_queryables",
            {"collection_id": collection_id},
            catalog_url=catalog_url,
            headers=None,
        )
  • Central tool handler registry dictionary mapping tool name 'get_queryables' to its handler function.
    _TOOL_HANDLERS: dict[str, Handler] = {
        "search_collections": handle_search_collections,
        "get_collection": handle_get_collection,
        "search_items": handle_search_items,
        "get_item": handle_get_item,
        "estimate_data_size": handle_estimate_data_size,
        "get_root": handle_get_root,
        "get_conformance": handle_get_conformance,
        "get_queryables": handle_get_queryables,
        "get_aggregations": handle_get_aggregations,
        "sensor_registry_info": handle_sensor_registry_info,
    }
  • Import of the get_queryables handler into the execution module.
    from stac_mcp.tools.get_queryables import handle_get_queryables
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states a read operation ('Get') but doesn't disclose behavioral traits like authentication needs, rate limits, error handling, or what 'queryable properties' entail. This leaves significant gaps for an agent to understand how to invoke it correctly.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and appropriately sized for its content.

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?

Given the tool has an output schema, the description doesn't need to explain return values. However, with no annotations, 0% schema coverage, and two parameters, the description is minimal—it covers the basic purpose but lacks details on usage, behavior, and parameter semantics, making it incomplete for full agent understanding.

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 0%, so the schema provides no parameter details. The description adds some meaning by specifying 'for a specific STAC collection by its ID', which clarifies the purpose of 'collection_id'. However, it doesn't explain 'catalog_url' or provide format examples, leaving parameters partially undocumented.

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 verb ('Get') and resource ('queryable properties for a specific STAC collection'), making the purpose understandable. It doesn't explicitly distinguish from sibling tools like 'get_collection' or 'search_collections', which might also involve STAC collections, so it misses full differentiation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives such as 'get_collection' or 'search_collections'. It mentions a specific resource but lacks context about prerequisites, exclusions, or comparative use cases.

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/Wayfinder-Foundry/stac-mcp'

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