Skip to main content
Glama
Quaestor-Technologies

Standard Metrics MCP Server

search_companies

Find companies by name, sector, or city using filters. Supports pagination for browsing results.

Instructions

Search companies by various criteria.

Args: name_contains: Filter companies containing this text in their name sector: Filter companies by sector city: Filter companies by city page: Page number for pagination (default: 1) per_page: Results per page (default: 100, max: 100)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
name_containsNo
sectorNo
cityNo
pageNo
per_pageNo

Implementation Reference

  • The MCP tool handler for search_companies. It fetches all companies (paginated) via the client, then applies client-side filtering by sector, city, and/or name_contains.
    @mcp.tool
    async def search_companies(
        name_contains: str | None = None,
        sector: CompanySector | None = None,
        city: str | None = None,
        page: int = 1,
        per_page: int = 100,
    ) -> list[Company]:
        """Search companies by various criteria.
    
        Args:
            name_contains: Filter companies containing this text in their name
            sector: Filter companies by sector
            city: Filter companies by city
            page: Page number for pagination (default: 1)
            per_page: Results per page (default: 100, max: 100)
        """
        async with StandardMetrics() as client:
            results = (await client.get_companies(page=page, page_size=per_page)).results
            if sector:
                results = [c for c in results if c.sector == sector]
            if city:
                results = [c for c in results if c.city == city]
            if name_contains:
                results = [c for c in results if name_contains.lower() in c.name.lower()]
            return results
  • src/server.py:74-78 (registration)
    The MCP server instance is created in server.py and tools are registered by importing all from src.tools, which includes the @mcp.tool decorated search_companies function.
    mcp = fastmcp.FastMCP[Any](
        "smx-mcp",
        instructions=_MCP_INSTRUCTIONS,
    )
    from src.tools import *  # noqa: F403 - need to register all of the tools
  • The CompanySector enum type used for the 'sector' parameter in search_companies for input validation.
    class CompanySector(enum.StrEnum):
        B2B_SOFTWARE = "B2B Software"
        DIRECT_TO_CONSUMER = "Direct-to-consumer"
        CONSUMER_INTERNET_MOBILE = "Consumer Internet/Mobile"
        AR_VR = "AR/VR"
        LIFE_SCIENCES = "Life Sciences"
        HEALTH_TECHNOLOGY = "Health Technology"
        HARDWARE = "Hardware"
        EDTECH = "Edtech"
        MEDIA = "Media"
        FINTECH = "Fintech"
        GOVTECH = "Govtech"
        CRYPTO_BLOCKCHAIN = "Crypto/blockchain"
        OTHER = "Other"
        LOGISTICS = "Logistics"
        INSURTECH = "Insurtech"
        SOFTWARE_INFRASTRUCTURE = "Software Infrastructure"
        SECURITY = "Security"
        ARTIFICIAL_INTELLIGENCE = "Artificial Intelligence"
        AG_TECH = "AG-Tech"
        SUSTAINABILITY = "Sustainability"
        GAMING = "Gaming"
  • The Company Pydantic model that defines the structure of company objects returned by search_companies.
    class Company(pydantic.BaseModel):
        id: str
        name: str
        slug: str | None = None
        description: str | None = None
        city: str | None = None
        sector: CompanySector | None = None
        firm_sector: str | None = None
        fiscal_year_end: str | None = pydantic.Field(
            None,
            description="MM/DD format",
        )
        website: str | None = None
        logo_url: str | None = None
        status: str | None = None
        investment_lead_id: str | None = None
        invested_fund_ids: list[str] | None = None
        unique_ref: str | None = None
  • The StandardMetrics.get_companies() method that search_companies calls internally to fetch the list of companies from the API.
    async def get_companies(
        self,
        *,
        page: int = 1,
        page_size: int = 100,
        ids: list[str] | None = None,
    ) -> PaginatedCompanies:
        """Get all companies associated with your firm."""
        params: dict[str, Any] = {"page": page, "page_size": page_size}
        if ids:
            for company_id in ids:
                params.setdefault("ids[]", []).append(company_id)
        response = await self._request("GET", "v1/companies/", params=params)
        return PaginatedCompanies.model_validate(response)
Behavior3/5

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

No annotations are provided. The description mentions pagination defaults and maximum per_page, which is helpful. It does not discuss side effects, but as a search tool, destructive actions are unlikely. Behavioral traits are adequately but minimally covered.

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 a single introductory sentence followed by a parameter list, making it front-loaded and easy to scan. It is not overly verbose, but the parameter list repeats names already in the schema, adding slight redundancy.

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?

With 5 parameters, no annotations, and no output schema, the description covers parameter usage and pagination but omits the return format or result structure. This is adequate but leaves some gaps for a new user.

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?

Despite 0% schema description coverage, the description adds meaningful context for each parameter, explaining filtering behavior and pagination defaults. This compensates for the lack of schema descriptions, though it could be more detailed (e.g., sector values).

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 it searches companies by various criteria, specifying verb and resource. However, it does not differentiate from the sibling 'list_companies', which might also return companies but likely without filters.

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 when filtering by criteria ('Search companies by various criteria') but offers no explicit guidance on when to use this tool versus alternatives like 'list_companies'.

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/Quaestor-Technologies/smx-mcp'

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