Skip to main content
Glama

Create a leave request

deputy_create_leave_request
Destructive

Add a leave request for an employee. By default it waits for manager approval (status 0); pass status 1 only when your system is the source of truth and the leave is already approved. Deputy tracks leave in hours, so give exact start and end times. Find leave type ids with deputy_query_resource on LeaveRules. Deputy: POST /api/v1/resource/Leave.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNo0 awaiting approval (default), 1 already approved.
commentYesThe employee's note to the manager.
end_dateYesLast day, YYYY-MM-DD.
end_timeYesLeave end: a unix timestamp in seconds, or an ISO 8601 datetime (include an offset for local times).
start_dateYesFirst day, YYYY-MM-DD.
start_timeYesLeave start: a unix timestamp in seconds, or an ISO 8601 datetime (include an offset for local times).
employee_idYesThe employee id.
location_idYesLocation (Company id) the leave is recorded against.
leave_rule_idYesLeave type (LeaveRules id), e.g. annual leave.
approval_commentNoManager's comment, when status is 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare destructiveHint=true, so the description usefully adds the approval-workflow semantics (default status 0 waits for manager approval), the fact that leave is tracked in hours requiring exact start/end times, and the API route. It does not cover failure behavior or what happens to overlapping/duplicate leave, but it adds real context beyond the annotations.

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?

Four short sentences, front-loaded with the action and the default behavior, then the exception, then unit/time guidance, then the id lookup and endpoint. No filler or repetition.

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?

For a 10-parameter mutation with no output schema, the description covers the critical gotchas: approval status semantics and the hours/exact-times requirement. It leaves the required comment field and any validation/failure behavior unexplained, so it is strong but not fully complete.

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?

Schema description coverage is 100%, so the baseline is 3, but the description adds meaning beyond the schema: it explains the default/conditional semantics of status and tells the agent how to obtain a valid leave_rule_id via deputy_query_resource on LeaveRules. It does not clarify why comment is required or the approval_comment interaction.

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?

Opens with a specific verb+resource ('Add a leave request for an employee') and immediately scopes the default behavior. It is clearly distinguishable from deputy_list_leave and the other create_* siblings, and it even names the underlying Deputy endpoint.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit conditional guidance for status ('pass status 1 only when your system is the source of truth and the leave is already approved') and routes the agent to deputy_query_resource on LeaveRules for the leave type id. It does not state when to prefer a sibling (e.g. deputy_list_leave) or any precondition on the required comment field, so it falls just short of fully explicit when/when-not coverage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.