Skip to main content
Glama
lmwharton

lmwharton/sieve-mcp

sieve_usage

Read-only

Check your Sieve API usage for the current billing period, including screens used, monthly limit, tier, and organization name.

Instructions

Check your Sieve API usage for the current billing period.

Shows screens used, monthly limit, tier, and organization name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler definition for sieve_usage. It is decorated with @mcp.tool and calls client.usage() to check account usage.
    @mcp.tool(
        annotations={
            "readOnlyHint": True,
            "destructiveHint": False,
            "openWorldHint": True,
        }
    )
    async def sieve_usage() -> dict:
        """Check your Sieve API usage for the current billing period.
    
        Shows screens used, monthly limit, tier, and organization name.
        """
        return await client.usage()
  • The client.usage() function called by sieve_usage. It makes a GET request to the /usage endpoint of the Sieve Public API.
    async def usage() -> dict[str, Any]:
        """Check API usage for the current billing period."""
        return await _request("GET", "/usage")
  • The underlying _request() helper that executes the HTTP request and handles errors, used by the usage() function.
    async def _request(
        method: str,
        path: str,
        *,
        json_body: dict[str, Any] | None = None,
        timeout: float = 15.0,
    ) -> dict[str, Any]:
        """Execute an HTTP request and return the JSON response or an error dict."""
        if not SIEVE_API_KEY:
            return {
                "error": "Missing API key",
                "detail": "Set the SIEVE_API_KEY environment variable. "
                "Get your key at https://app.sieve.arceusxventures.com/settings",
            }
    
        url = f"{SIEVE_API_URL.rstrip('/')}{_BASE}{path}"
        start = time.monotonic()
        result: dict[str, Any] = {}
    
        try:
            async with httpx.AsyncClient(timeout=timeout) as client:
                response = await client.request(
                    method, url, headers=_headers(), json=json_body
                )
                response.raise_for_status()
                result = response.json()
                return result  # type: ignore[no-any-return]
    
        except httpx.HTTPStatusError as exc:
            try:
                body = exc.response.json()
            except Exception:
                body = exc.response.text
            result = {
                "error": f"HTTP {exc.response.status_code}",
                "detail": body,
            }
            return result
    
        except httpx.TimeoutException:
            result = {
                "error": "Request timed out",
                "detail": f"The request to {path} timed out after {timeout}s.",
            }
            return result
    
        except httpx.RequestError as exc:
            result = {
                "error": "Connection error",
                "detail": str(exc),
            }
            return result
    
        finally:
            duration_ms = round((time.monotonic() - start) * 1000)
            try:
                if _posthog is not None:
                    _posthog.capture(
                        distinct_id=_anonymous_user_id(),
                        event="mcp_tool_called",
                        properties={
                            "tool": path.split("/")[1] if "/" in path else path,
                            "method": method,
                            "path": path,
                            "duration_ms": duration_ms,
                            "success": "error" not in result,
                            "error": result.get("error"),
                        },
                    )
            except Exception:
                pass  # Never let analytics break the tool
  • The @mcp.tool decorator with annotations registers sieve_usage as an MCP tool.
    @mcp.tool(
        annotations={
            "readOnlyHint": True,
            "destructiveHint": False,
            "openWorldHint": True,
        }
    )
Behavior4/5

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

Annotations already indicate read-only and non-destructive behavior. The description adds specifics about what data is returned (screens used, monthly limit, tier, org name), providing useful context beyond 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?

Two sentences with no wasted words, front-loaded with the main purpose. Highly concise and well-structured.

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?

For a no-parameter tool with an output schema, the description adequately covers purpose and returned data. No gaps identified.

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 input schema has no parameters, so the description does not need to document them. Baseline score of 4 is appropriate.

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 clearly states the tool checks Sieve API usage for the current billing period and lists specific data shown (screens, limit, tier, org name), distinguishing it from sibling tools.

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 usage for checking billing usage but does not provide explicit guidance on when to use vs alternatives or when not to use.

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/lmwharton/sieve-mcp'

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