Skip to main content
Glama

department_list

Retrieve all organizational departments from the Ashby hiring system. Use this tool to access department data for managing hiring workflows and candidate placement.

Instructions

List all departments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeArchivedNoInclude archived departments

Implementation Reference

  • The handler function routes tool calls to the Ashby API by looking up the endpoint in `TOOL_ENDPOINT_MAP`. The `department_list` tool uses this generic handler to call `/department.list`.
    @server.call_tool()
    async def handle_call_tool(name: str, arguments: dict[str, Any]) -> list[types.TextContent]:
        """Route tool calls to the correct Ashby endpoint, passing arguments directly."""
        endpoint = TOOL_ENDPOINT_MAP.get(name)
        if not endpoint:
            return [types.TextContent(type="text", text=f"Unknown tool: {name}")]
    
        try:
            # Pass arguments straight through -- tool schemas already use Ashby's
            # camelCase param names so no translation is needed.
            response = ashby.post(endpoint, data=arguments if arguments else None)
            return [types.TextContent(type="text", text=json.dumps(response, indent=2))]
        except requests.exceptions.HTTPError as e:
            error_body = ""
            if e.response is not None:
                try:
                    error_body = e.response.text
                except Exception:
                    pass
            return [
                types.TextContent(
                    type="text",
                    text=f"Ashby API error on {endpoint}: {e}\n{error_body}",
                )
            ]
        except Exception as e:
            return [types.TextContent(type="text", text=f"Error calling {endpoint}: {e}")]
  • The schema definition for `department_list` in the `TOOLS` list.
    types.Tool(
        name="department_list",
        description="List all departments.",
        inputSchema={
            "type": "object",
            "properties": {
                "includeArchived": {"type": "boolean", "description": "Include archived departments"},
            },
        },
    ),
  • The registration mapping of the tool name to the API endpoint in `TOOL_ENDPOINT_MAP`.
    "department_list": "/department.list",
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It doesn't disclose whether this is a read-only operation, if it requires authentication, how results are returned (e.g., pagination), or any rate limits. 'List all departments' implies a safe read, but lacks confirmation or details.

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—just three words—with zero wasted language. It's front-loaded and efficiently communicates the core action, though this brevity contributes to gaps in other dimensions.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations, no output schema, and minimal description, this is incomplete. The agent lacks context on return format, error handling, or operational constraints. While the tool is simple (one optional parameter), the description doesn't provide enough information for reliable use beyond basic inference.

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 100%, with the single parameter 'includeArchived' fully documented in the schema. The description adds no parameter-specific information beyond implying a list operation, so it meets the baseline for high schema coverage without compensating value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'List all departments' clearly states the verb ('List') and resource ('departments'), making the basic purpose understandable. However, it lacks specificity about scope or format, and doesn't differentiate from sibling tools like 'location_list' or 'user_list' that follow similar patterns.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, context, or exclusions, nor does it reference sibling tools like 'archive_reason_list' or 'candidate_tag_list' that might serve related purposes.

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/PlenishAI/mcp-ashby'

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