Leave Manager
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Leave ManagerWhat's the leave balance for employee ID 5?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Leave Manager MCP Server
This project is a Python MCP server for managing employees, leave balances, and leave requests with SQLite.
1. Create the project
Open PowerShell and create a project directory:
mkdir D:\Coding\mcpserver\LeaveManager
cd D:\Coding\mcpserver\LeaveManagerCreate a uv Python project inside leave_manager_server:
uv init leave_manager_server
cd leave_manager_server
uv add "mcp[cli]>=2.1.1"The project requires Python 3.14 or newer. uv creates pyproject.toml, uv.lock, and the virtual environment used to run the server.
Related MCP server: leave_manager
2. Implement the server
Create server.py and add the following parts:
Import
MCPServerfrommcp.server.mcpserver.Create the server with
MCPServer("Leave Manager").Define
EmployeeandLeaveRequestdata models.Create a SQLite database next to
server.pyusing an absolute path.Initialize
employeesandleave_requeststables and insert sample data on startup.Add resources for employee directories and leave requests.
Add tools to submit and approve leave, check balances, list pending approvals, get database statistics, and add employees.
Start the server from the
__main__block:
if __name__ == "__main__":
init_database()
mcp.run()The project uses MCP 2.x. The old MCP 1.x import does not work with this dependency:
from mcp.server.fastmcp import FastMCPThe working MCP 2.x form is:
from mcp.server.mcpserver import MCPServer
mcp = MCPServer("Leave Manager")3. Run the server directly
From the project directory:
cd D:\Coding\mcpserver\LeaveManager\leave_manager_server
uv run server.pyThe server uses standard input/output for MCP communication, so it stays running while an MCP client is connected. Press Ctrl+C to stop it.
Validate that the module imports correctly without starting the long-running server:
uv run python -c "import server; print('Server import valid')"4. Test with MCP Inspector
The supported development command is:
cd D:\Coding\mcpserver\LeaveManager\leave_manager_server
uv run mcp dev server.pyThe MCP Inspector uses Node.js. Install Node.js 22.19.0 or newer before using the latest Inspector. Check versions with:
node --version
npm --versionDo not run npm i in this Python project directory because it has no package.json. If Inspector reports a missing native binding, clear the temporary npx cache and retry:
Remove-Item "$env:LOCALAPPDATA\npm-cache\_npx" -Recurse -Force
uv run mcp dev server.py5. Connect Claude Desktop
Claude Desktop reads its configuration from:
%APPDATA%\Claude\claude_desktop_config.jsonAdd this server entry. Replace the path if the project is stored elsewhere:
{
"mcpServers": {
"leave-manager": {
"command": "uv",
"args": [
"run",
"--directory",
"D:\\Coding\\mcpserver\\LeaveManager\\leave_manager_server",
"server.py"
]
}
}
}Restart Claude Desktop after saving the configuration. The server creates leave_manager.db beside server.py on its first startup.
Available MCP features
Resources:
employees://allemployee://{employee_id}leave-requests://allleave-requests://employee/{employee_id}leave-requests://status/{status}
Tools:
submit_leave_requestapprove_leave_requestcheck_leave_balanceget_pending_approvalsget_database_statsadd_employeeThis will add my Config file automaticuv run mcp install server.py --name "leave_manager"
Available Tools
6 toolsadd_employeeC
Add a new employee to the system with duplicate checking
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| manager | Yes | ||
| department | Yes | ||
| force_create | No | ||
| sick_leave_balance | No | ||
| annual_leave_balance | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full disclosure burden. It reveals one behavioral trait ('duplicate checking'), but does not state what happens when a duplicate is found, whether force_create bypasses that check, what permissions are needed, or whether the operation is reversible. For a mutation tool with zero annotation coverage this is thin.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no filler. It is efficient, though its brevity borders on under-specification for a six-parameter mutation tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need not be described. But with six undocumented parameters, no annotations, and a state-changing operation, the definition leaves major gaps an agent needs before calling it safely.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% across six parameters, so the description is expected to compensate but does not. None of name, manager, department, force_create, sick_leave_balance, or annual_leave_balance are explained, and the vague 'duplicate checking' phrase never connects to force_create.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('Add') and resource ('employee'), which is enough to separate it from the leave-management siblings listed. However, it does not explicitly contrast itself with any sibling, so it lands just short of the top band.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no when-to-use guidance, no prerequisites, and no mention of alternatives. The agent learns what the tool does but not the context or conditions for invoking it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
approve_leave_requestD
Approve a leave request
| Name | Required | Description | Default |
|---|---|---|---|
| request_id | Yes | ||
| approver_name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden, yet it discloses nothing about authorization requirements (who may approve), irreversibility of the state change, side effects such as notifications to the requester, or failure modes for already-decided requests. It only implies a mutation via the word 'Approve'.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
It is short, but that brevity reflects under-specification rather than conciseness: the single phrase duplicates the tool name and earns no additional place in the definition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a state-changing approval operation with an output schema but zero annotation coverage and zero parameter documentation, the definition omits everything an agent needs — required permissions, effect of approval, idempotency, and the meaning of both required inputs.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% for both parameters, so the description must compensate, but it says nothing about request_id (format, source, where to obtain it) or approver_name (whether it must match an authenticated identity). The two required parameters are entirely undocumented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The text 'Approve a leave request' is a verbatim human-readable restatement of the tool name approve_leave_request, adding no scope, object detail, or distinguishing information. It does not distinguish this tool from siblings like submit_leave_request or get_pending_approvals beyond the obvious verb.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no when-to-use guidance, no prerequisites, and no reference to alternatives such as get_pending_approvals (which presumably surfaces the requests worth approving). The agent must infer the entire workflow context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
check_leave_balanceC
Check leave balance for an employee
| Name | Required | Description | Default |
|---|---|---|---|
| employee_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavior. It only states the action; it does not mention read-only nature, permissions required, side effects, or whether it returns current or accrued balance. The output schema covers return values, but behavioral traits are absent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single front-loaded sentence with no filler. It is arguably too terse given missing guidance, but from a pure conciseness standpoint it avoids waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-param read tool, the description covers the core purpose, and the output schema handles return values. Still missing parameter semantics and usage context, leaving an agent to infer format and when to call.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% for the single employee_id parameter. The phrase 'for an employee' merely restates the parameter name and adds no format, source, or validation detail (e.g., whether it is a UUID or email). It fails to compensate for the coverage gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb 'check' and resource 'leave balance' scoped to an employee, making the action clear. It does not explicitly differentiate from siblings like submit_leave_request or approve_leave_request, though the verb implies a read-only query.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No indication of when to use this tool versus alternatives, no prerequisites (e.g., employee must exist), and no mention of related tools. Usage is only implied by the verb.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_database_statsC
Get database statistics
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It does not clarify whether this is read-only, what scope of statistics is returned, or any performance/caching considerations, though the verb "Get" weakly implies a read.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no filler. It is appropriately terse for a zero-parameter call, though the brevity comes at the cost of detail rather than being maximally informative.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need not be explained. For a zero-param read tool this is minimally adequate, but the description omits what the statistics cover, which the agent cannot recover from a generic schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so the baseline is 4. The description correctly implies no input is required, and there are no parameter semantics to document.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a generic verb and resource ("Get database statistics"), which is understandable but essentially restates the tool name with no differentiation from siblings and no indication of which statistics or for what entity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool, what triggers it, or how it relates to the leave-management siblings. The agent must infer usage entirely.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_pending_approvalsA
Get all pending leave requests that need approval
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. 'Get all' usefully discloses an unfiltered, complete read with no parameters, but it says nothing about required permissions (approver role), scope (own team vs. all), or freshness of results. Adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence with no filler. Every word contributes to defining the resource and its scope.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple, zero-parameter read tool with an output schema (which covers return values), the description supplies enough to select and invoke it. Only minor gaps around authorization context remain.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so per the baseline there is nothing for the description to disambiguate; the description correctly conveys that no input filtering is available.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Get') and resource ('all pending leave requests that need approval'), and the name/siblings make the scope distinct from approve_leave_request or submit_leave_request. It is clear but relies on the tool name rather than explicit contrast with alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'need approval' implies the usage context (an approver looking at their queue), but there is no explicit when-to-use statement, no mention of prerequisites, and no routing toward alternatives. Usage is only implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
submit_leave_requestC
Submit a new leave request
| Name | Required | Description | Default |
|---|---|---|---|
| reason | Yes | ||
| end_date | Yes | ||
| leave_type | Yes | ||
| start_date | Yes | ||
| employee_id | Yes | ||
| days_requested | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure, but it only implies a mutation ('Submit') without stating permissions required, validation rules, whether approval is triggered, or what happens to existing data. It reveals that a write occurs but nothing about side effects or constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The single sentence is front-loaded and free of filler, but it is under-specified relative to the tool's complexity. Brevity here functions as omission rather than efficiency, since the sentence adds almost nothing beyond the tool name.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need not be described, but the input side is severely under-documented: six required parameters with no schema descriptions and no annotation coverage. For a mutation tool that likely interacts with leave balances and approval workflows, the description should convey more context to prevent malformed calls.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and there are six required parameters, yet the description adds no meaning for any of them. It does not explain formats for dates, allowable values for leave_type, the relationship between start_date/end_date and days_requested, or the employee_id semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Submit') and resource ('a new leave request'), making the tool's core action immediately clear. It does not explicitly differentiate itself from siblings like approve_leave_request or check_leave_balance, so an agent must rely on tool names to disambiguate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description offers no when-to-use guidance, no prerequisites, and no mention of alternatives such as checking leave balance first. It simply restates the action, leaving the agent to infer the appropriate context without help.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v0.1.0- First observed
add_employee - First observed
approve_leave_request - First observed
check_leave_balance - First observed
get_database_stats - First observed
get_pending_approvals - First observed
submit_leave_request
TDQS
Scored across 6 tools
Each tool has a clearly distinct action and target resource; there is no overlap between submitting, approving, checking balance, listing pending approvals, adding employees, or retrieving stats.
All tool names follow a consistent snake_case verb_noun pattern (submit_leave_request, approve_leave_request, etc.), making the set predictable and easy to parse.
Six tools is well within the typical 3-15 range for a focused domain. Each tool earns its place, though get_database_stats is somewhat generic.
The leave lifecycle lacks key operations like reject_leave_request, cancel_leave_request, or get_leave_history. Approval without rejection is a notable gap, and employee management only supports addition.
Maintenance
Related MCP Connectors
Employee leave and PTO requests: balances, approvals, calendars, and who-is-out summaries.
Employee leave and PTO requests: balances, approvals, calendars, and who-is-out summaries.
121Track and manage employee time off with quick balance lookups and streamlined applications. Find t…
Governed HR records and confirmed time-off actions for UK SMEs.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage employee leave by checking balances, applying for leave, and viewing history via MCP tools.-
- FlicenseNot gradedqualityDmaintenanceEnables natural-language-based employee leave management including leave balance checks, leave applications, approvals, and history retrieval through an MCP-compatible client.-
- FlicenseAqualityCmaintenanceExposes employee leave-management operations (add employees, check balance, apply/cancel leave, view history) as MCP tools for AI clients like Claude Desktop to call directly.6-
- FlicenseNot gradedqualityBmaintenanceEnables managing employee information, tasks (todos), and company policies via MCP tools and resources.-