Skip to main content
Glama
ptorsten

humaans-mcp

by ptorsten

search_people_by_name

Find people by matching any part of their first, last, or preferred name with a case-insensitive substring search.

Instructions

Case-insensitive substring search over firstName/lastName/preferredName across all people. Pulls the full people list then filters client-side.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The actual handler for the 'search_people_by_name' tool. It performs a case-insensitive substring search over firstName/lastName/preferredName/middleName by fetching all people and filtering client-side, returning up to `limit` results.
    async def search_people_by_name(query: str, limit: int = 20) -> list[dict[str, Any]]:
        """Case-insensitive substring search over firstName/lastName/preferredName across all people. Pulls the full people list then filters client-side."""
        q = query.strip().lower()
        if not q:
            return []
        all_people = await client().list_all("/people")
        matches = []
        for p in all_people:
            hay = " ".join(
                str(p.get(k) or "") for k in ("firstName", "lastName", "preferredName", "middleName")
            ).lower()
            if q in hay:
                matches.append(p)
                if len(matches) >= limit:
                    break
        return matches
  • The tool is registered with the MCP server via the @mcp.tool() decorator on line 78.
    @mcp.tool()
  • Input parameters: query (str, required) and limit (int, default 20). Output type: list[dict[str, Any]]. The docstring also serves as the tool description exposed via MCP.
    async def search_people_by_name(query: str, limit: int = 20) -> list[dict[str, Any]]:
  • The `list_all` helper method on HumaansClient is used by the handler to fetch all people from the /people endpoint with pagination handled transparently.
    async def list_all(
        self,
        path: str,
        filters: dict[str, Any] | None = None,
        cap: int = MAX_LIST_ALL,
    ) -> list[dict[str, Any]]:
        collected: list[dict[str, Any]] = []
        skip = 0
        while len(collected) < cap:
            page = await self.list_page(path, filters=filters, limit=PAGE_SIZE, skip=skip)
            items = page.get("data") if isinstance(page, dict) else page
            if not items:
                break
            collected.extend(items)
            if len(items) < PAGE_SIZE:
                break
            skip += PAGE_SIZE
        return collected[:cap]
Behavior4/5

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

With no annotations, the description discloses that it pulls the full people list and filters client-side, which is important behavioral information. It also notes case-insensitivity and substring matching. However, it does not mention potential side effects, authentication needs, or rate limits.

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 extremely concise with only two sentences, no wasted words. It front-loads the core functionality (substring search) and includes technical behavior (client-side filtering).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/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, return values need no explanation. The description covers the search mechanism and basic parameter semantics. However, it does not address pagination behavior or the interaction with list_people (which likely provides the full list). It is fairly complete for a simple search tool.

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 description adds value by explaining that the query parameter searches over name fields. However, the limit parameter is only implicitly described (default 20), without elaboration on its purpose or effect. Overall, the description provides some but not full compensation for the missing schema descriptions.

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 it performs a case-insensitive substring search over firstName/lastName/preferredName across all people. This distinguishes it from siblings like find_person_by_email (by email) and list_people (list all).

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 use for name substring searches but does not explicitly state when to use this tool versus alternatives like find_person_by_email or list_people. It mentions client-side filtering, hinting at performance trade-offs, but lacks explicit when-to-use or when-not-to-use guidance.

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/ptorsten/humaans-mcp'

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