Skip to main content
Glama
henrysouchien

edgar-mcp

get_filings

Fetch SEC filing metadata for companies to access 10-Q, 10-K, and 8-K reports with URLs, dates, and fiscal period information.

Instructions

Fetch SEC filing metadata for a company. Returns list of 10-Q, 10-K, and 8-K (earnings release) filings with URLs, dates, and fiscal period assignments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tickerYes
yearYes
quarterYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main async handler function decorated with @mcp.tool() that accepts ticker, year, and quarter parameters. It delegates to _run_tool_guarded with the tool name and arguments.
    @mcp.tool()
    async def get_filings(
        ticker: str,
        year: int,
        quarter: int,
    ) -> dict:
        """
        Fetch SEC filing metadata for a company. Returns list of 10-Q, 10-K, and 8-K
        (earnings release) filings with URLs, dates, and fiscal period assignments.
        """
        return await _run_tool_guarded(
            "get_filings",
            {"ticker": ticker, "year": year, "quarter": quarter},
        )
  • Proxy function that makes the actual API call to the remote EDGAR API. Calls /api/filings endpoint with ticker, year, and quarter parameters.
    def _proxy_get_filings(args: dict) -> dict:
        return _call_api("/api/filings", {
            "ticker": args["ticker"],
            "year": args["year"],
            "quarter": args["quarter"],
        })
  • Tool dispatch dictionary that registers 'get_filings' to its proxy function _proxy_get_filings. Used by _run_tool_guarded to route tool calls.
    _TOOL_DISPATCH = {
        "get_filings": _proxy_get_filings,
        "get_financials": _proxy_get_financials,
        "get_metric": _proxy_get_metric,
        "list_metrics": _proxy_list_metrics,
        "search_metrics": _proxy_search_metrics,
        "get_filing_sections": _proxy_get_filing_sections,
    }
  • Tool timeout configuration that sets a 30-second timeout for get_filings tool execution.
    _TOOL_TIMEOUT = {
        "get_filings": 30,
        "get_financials": 60,
        "get_metric": 30,
        "list_metrics": 45,
        "search_metrics": 45,
        "get_filing_sections": 60,
    }
  • HTTP helper function that makes GET requests to the remote EDGAR API with authentication and error handling.
    def _call_api(path: str, params: dict, timeout: int = 60) -> dict:
        """HTTP GET to the remote EDGAR API. Returns parsed JSON or error dict."""
        base_url, api_key = _get_api_config()
        if not api_key:
            return {"status": "error", "message": "EDGAR_API_KEY is not configured"}
    
        url = f"{base_url}{path}"
        payload = dict(params)
        payload["key"] = api_key
    
        t0 = time.time()
        try:
            resp = requests.get(url, params=payload, timeout=timeout)
        except requests.RequestException as exc:
            return {"status": "error", "message": f"EDGAR API request failed after {time.time()-t0:.1f}s: {exc}"}
    
        try:
            data = resp.json()
        except ValueError:
            return {"status": "error", "message": f"Invalid JSON from EDGAR API (HTTP {resp.status_code})"}
    
        if resp.status_code != 200:
            if isinstance(data, dict) and data:
                return data
            return {"status": "error", "message": f"EDGAR API error (HTTP {resp.status_code})"}
    
        return data
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 of behavioral disclosure. It mentions the tool returns a list with URLs, dates, and fiscal period assignments, which gives some context about output format. However, it doesn't disclose critical behavioral traits such as whether this is a read-only operation, potential rate limits, authentication needs, error handling, or pagination behavior. For a tool with no annotations, this leaves significant gaps.

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

Conciseness4/5

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

The description is appropriately concise with two sentences that efficiently convey the tool's purpose and what it returns. It's front-loaded with the main action ('Fetch SEC filing metadata'), and the second sentence adds necessary detail about filing types and returned data. There's no wasted verbiage, making it easy to parse.

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's complexity (3 required parameters, no annotations, but with an output schema), the description is partially complete. It explains what the tool does and the types of filings returned, which is helpful. However, it lacks details on parameter usage, behavioral traits, and how it differs from siblings. The presence of an output schema means the description doesn't need to explain return values, but other gaps remain, making it adequate but with clear room for improvement.

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?

The input schema has 3 parameters (ticker, year, quarter) with 0% description coverage, meaning the schema provides no semantic information. The description doesn't add any parameter-specific details—it doesn't explain what 'ticker' represents, the format of 'year' and 'quarter', or how they filter results. However, since the tool has an output schema (as per context signals), the baseline is adjusted; the description implies parameters are used to fetch metadata but doesn't compensate for the low schema coverage.

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's purpose: 'Fetch SEC filing metadata for a company' specifies the verb (fetch) and resource (SEC filing metadata). It distinguishes from siblings like 'get_filing_sections' (which likely extracts sections) and 'get_financials' (which likely provides financial data), but doesn't explicitly contrast them. The description is specific about what types of filings are returned (10-Q, 10-K, 8-K), which adds clarity.

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. It doesn't mention when to choose 'get_filings' over 'get_financials' or 'search_metrics', nor does it specify prerequisites or exclusions. The context is implied (fetching metadata for SEC filings), but explicit usage guidelines are missing.

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/henrysouchien/edgar-mcp'

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