Skip to main content
Glama
ptorsten

humaans-mcp

by ptorsten

get_person

Retrieve a person by their Humaans id; custom field values are merged as top-level keys, with native attributes prevailing on name conflicts.

Instructions

Retrieve a single person by their Humaans id. Employee-scoped custom field values are merged onto the person object as top-level keys named after the field (e.g. "Level": "IC5", "Cost Center": ["R&D"]). Native attributes win on name collisions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
person_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler for the 'get_person' tool. Fetches a person by ID from /people/{person_id}, retrieves custom field names and values for that person, and merges employee-scoped custom field values onto the person object as top-level keys.
    @mcp.tool()
    async def get_person(person_id: str) -> dict[str, Any]:
        """Retrieve a single person by their Humaans id. Employee-scoped custom field values are merged onto the person object as top-level keys named after the field (e.g. "Level": "IC5", "Cost Center": ["R&D"]). Native attributes win on name collisions."""
        person = await client().get(f"/people/{person_id}")
        names = await _custom_field_names()
        values = await client().list_all("/custom-values", filters={"personId": person_id})
        for k, v in _resolve_custom(values, names).items():
            person.setdefault(k, v)
        return person
  • The tool is registered using the @mcp.tool() decorator on line 59, which registers 'get_person' with the FastMCP server.
    @mcp.tool()
  • The input schema is defined by the function signature: takes a single 'person_id' parameter of type str. The output type is dict[str, Any]. The decorator @mcp.tool() auto-generates the JSON schema from this type annotation.
    @mcp.tool()
    async def get_person(person_id: str) -> dict[str, Any]:
        """Retrieve a single person by their Humaans id. Employee-scoped custom field values are merged onto the person object as top-level keys named after the field (e.g. "Level": "IC5", "Cost Center": ["R&D"]). Native attributes win on name collisions."""
        person = await client().get(f"/people/{person_id}")
        names = await _custom_field_names()
        values = await client().list_all("/custom-values", filters={"personId": person_id})
        for k, v in _resolve_custom(values, names).items():
            person.setdefault(k, v)
        return person
  • Helper function _custom_field_names() fetches all custom field definitions and returns a mapping of customFieldId -> field name. Called by get_person to resolve custom field IDs to human-readable names.
    async def _custom_field_names() -> dict[str, str]:
        """Map customFieldId → field name for every custom field configured."""
        fields = await client().list_all("/custom-fields")
        return {f["id"]: f.get("name") for f in fields if f.get("id")}
  • Helper function _resolve_custom() processes custom field values for a person, filtering to employee-scoped values (resourceId is null) and mapping them to field names. Called by get_person to merge custom data onto the person object.
    def _resolve_custom(values: list[dict[str, Any]], names: dict[str, str]) -> dict[str, Any]:
        """Project employee-scoped custom values (resourceId is null) into {fieldName: value}.
        Job-role/salary-bound values are skipped — query /custom-values directly for those."""
        by_name: dict[str, list[dict[str, Any]]] = {}
        for v in values:
            if v.get("resourceId") is not None:
                continue
            name = names.get(v.get("customFieldId") or "")
            if not name:
                continue
            by_name.setdefault(name, []).append(v)
        return {
            name: max(vs, key=lambda v: v.get("updatedAt") or "")["value"]
            for name, vs in by_name.items()
        }
Behavior4/5

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

With no annotations, the description discloses key behavior: custom field values merge as top-level keys and native attributes win on collisions. This adds value beyond the schema. However, it omits details like error handling (e.g., not found) or permissions.

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, front-loaded with purpose, and no unnecessary words. The second sentence concisely conveys important behavioral details about custom fields. Every sentence earns its place.

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?

Given the simple retrieval task and existence of an output schema, the description is complete: it explains the unique key and the merging behavior. No critical information is missing for an agent to use the tool correctly.

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 has one parameter with 0% description coverage. The description adds context ('by their Humaans id') clarifying the type of ID, but lacks format, length, or examples. Since baseline for 0 params is 4, but this tool has 1 param, the minimal extra info yields a 3.

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 states 'Retrieve a single person by their Humaans id,' clearly specifying the verb (retrieve), resource (person), and unique identifier. This distinguishes it from siblings like find_person_by_email (different key) and list_people (multiple results).

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?

Implicitly suggests using this tool when the Humaans id is known, but does not explicitly state when to use this versus alternatives like find_person_by_email or search_people_by_name. No when-not or alternative guidance provided.

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