Skip to main content
Glama

LeaveManager – MCP Server with Claude Integration

LeaveManager is a custom Model Context Protocol (MCP) server built using FastMCP.
It allows Claude to interact with a backend Leave Management System using natural language.

This project demonstrates how Claude can automatically select and execute backend tools based on user queries.


πŸš€ Features

  • Check employee leave balance

  • Apply leave for specific dates

  • View leave history

  • In-memory state management

  • Claude Desktop integration via MCP

  • Automatic tool selection from natural language


Related MCP server: Attendance Management MCP Server

🧠 Tech Stack

  • Python 3.10+

  • FastMCP

  • MCP CLI

  • Claude Desktop (for tool invocation)

  • uv (Python package manager)


πŸ“‚ Project Structure

my-first-mcp-server/ β”‚ β”œβ”€β”€ main.py β”œβ”€β”€ pyproject.toml β”œβ”€β”€ README.md β”œβ”€β”€ .gitignore β”œβ”€β”€ uv.lock └── .venv/


πŸ› οΈ MCP Tools

1️⃣ get_leave_balance

Checks remaining leave days for an employee.

Input:

  • employee_id (string)


2️⃣ apply_leave

Applies leave for given dates and updates balance.

Input:

  • employee_id (string)

  • leave_dates (list of YYYY-MM-DD)


3️⃣ get_leave_history

Returns all leave dates taken by an employee.

Input:

  • employee_id (string)


πŸ’‘ Example Claude Queries

  • β€œCheck leave balance for employee E001”

  • β€œApply leave for employee E001 on 2025-04-17 and 2025-05-01”

  • β€œShow leave history for employee E001”

Claude automatically selects and executes the correct MCP tool.


⚠️ Important Note on Data Storage

  • This project uses in-memory storage

  • Data resets when the MCP server restarts

  • This is intentional for simplicity

  • Can be extended with SQLite for persistence


▢️ Running Locally (Without Claude)

uv run main.py


🎯 Learning Outcomes

Built a real MCP server

Exposed backend tools to Claude

Understood stateful MCP behavior

Integrated Python backend with LLM tool calling

πŸ“Œ Future Improvements

SQLite persistence

Date validation & duplicate checks

Employee creation & reset tools

FastAPI + MCP hybrid architecture

πŸ§‘β€πŸ’» Author

Uma Maheswara Rao
Aspiring AI Engineer / Data Analyst

Available Tools

3 tools
apply_leaveC
Apply leave for specific dates (e.g., ["2025-04-17", "2025-05-01"])
ParametersJSON Schema
NameRequiredDescriptionDefault
employee_idYes
leave_datesYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Apply leave' implies a write/mutation operation, the description doesn't specify whether this requires approval, what permissions are needed, whether it's reversible, or what happens with conflicting dates. The example format is helpful but doesn't address critical behavioral aspects of a leave application system.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise - just one sentence with a helpful example. There's no wasted text, and the information is front-loaded. However, the brevity comes at the cost of completeness, making it more under-specified than optimally concise.

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

Completeness3/5

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

Given this is a mutation tool with no annotations, 2 parameters (0% schema coverage), but with an output schema present, the description is minimally adequate. The example format helps, but critical context is missing: no error conditions, no relationship to sibling tools, no behavioral constraints. The output schema existence means return values are documented elsewhere, but the description should still address more operational context.

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?

The description provides an example format for 'leave_dates' parameter (array of date strings), which adds meaningful context beyond the schema's 0% description coverage. However, it doesn't explain the 'employee_id' parameter at all, nor does it clarify date format requirements, validation rules, or what constitutes valid leave dates. The schema coverage is 0%, so the description partially compensates but not fully.

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 states the tool's purpose ('Apply leave for specific dates') which is a clear verb+resource combination. However, it doesn't distinguish this from potential sibling tools like 'get_leave_balance' or 'get_leave_history' - it only describes what it does without contextual differentiation. The example dates help illustrate the format but don't enhance the core purpose statement.

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?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, constraints, or relationships with sibling tools like 'get_leave_balance' (which might be needed before applying leave) or 'get_leave_history' (which might show past applications). The agent receives no help in determining appropriate usage contexts.

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

get_leave_balanceB

Check how many leave days are left for the employee

ParametersJSON Schema
NameRequiredDescriptionDefault
employee_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a read-only operation ('check'), but doesn't specify if it requires authentication, has rate limits, returns data in a specific format, or handles errors. This is a significant gap for a tool with no annotation coverage.

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 a single, efficient sentence that front-loads the core purpose without unnecessary words. Every part earns its place by clearly stating what the tool does, making it highly concise and well-structured.

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

Completeness3/5

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

Given the tool's low complexity (one parameter) and the presence of an output schema (which handles return values), the description is minimally adequate. However, it lacks context on usage versus siblings and behavioral details, making it incomplete for optimal agent guidance without additional structured data.

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?

The schema description coverage is 0%, but the description mentions 'for the employee', which hints at the 'employee_id' parameter's purpose. However, it doesn't add details like format or constraints beyond what's implied. With one parameter and low coverage, this provides minimal compensation, aligning with the baseline.

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

Purpose4/5

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

The description clearly states the action ('check') and resource ('leave days left for the employee'), making the tool's purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_leave_history' which might also involve checking leave information, so it misses the highest score.

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?

The description provides no guidance on when to use this tool versus alternatives like 'get_leave_history' or 'apply_leave'. It lacks context about prerequisites, such as needing an employee ID, or any exclusions, leaving the agent to infer usage from the tool name alone.

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

get_leave_historyC

Get leave history for the employee

ParametersJSON Schema
NameRequiredDescriptionDefault
employee_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.6/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Get leave history', implying a read-only operation, but doesn't specify if it requires authentication, returns paginated results, includes error handling, or has rate limits. For a tool with zero annotation coverage, this is a significant gap in transparency about how it behaves beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, straightforward sentence: 'Get leave history for the employee'. It's front-loaded with the core action and resource, avoiding unnecessary words. However, it could be more structured by including key details like scope or usage, but as-is, it's efficiently concise without being under-specified.

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

Completeness3/5

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

Given the tool's low complexity (one parameter) and the presence of an output schema (which likely covers return values), the description is minimally adequate. It states the basic purpose but lacks context on usage, parameters, and behavioral traits. With no annotations and low schema coverage, it doesn't fully compensate, but the output schema reduces the need to explain returns, keeping it at a baseline level.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has one parameter ('employee_id') with 0% schema description coverage, meaning the schema provides no details about its meaning or format. The description doesn't add any parameter semanticsβ€”it doesn't explain what 'employee_id' represents, its expected format (e.g., numeric, string), or validation rules. This fails to compensate for the low schema coverage, leaving the parameter poorly documented.

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 'Get leave history for the employee' clearly states the action (get) and resource (leave history), making the basic purpose understandable. However, it lacks specificity about what 'leave history' includes (e.g., past requests, approvals, dates) and doesn't distinguish it from sibling tools like 'get_leave_balance', which might overlap in scope. It avoids tautology but remains somewhat vague.

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, such as needing a valid employee ID, or contrast it with sibling tools like 'apply_leave' (for submitting requests) or 'get_leave_balance' (for current status). This leaves the agent without clear direction on appropriate contexts or exclusions.

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. Dates show when Glama detected each change.

  1. 3 tool updatesv0.1.0
    • First observedapply_leave
    • First observedget_leave_balance
    • First observedget_leave_history

TDQS

B3/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: apply_leave is for submitting new leave requests, get_leave_balance shows remaining leave days, and get_leave_history retrieves past leave records. There is no overlap in functionality, making tool selection straightforward for an agent.

Naming Consistency5/5

All tools follow a consistent verb_noun naming pattern (apply_leave, get_leave_balance, get_leave_history) with clear, descriptive names. The pattern is uniform throughout, enhancing readability and predictability.

Tool Count3/5

With only 3 tools, the server feels thin for a leave management domain, as it lacks operations like updating or canceling leave requests, viewing team leave calendars, or approving/rejecting leave. While the tools cover basic needs, the scope is borderline minimal.

Completeness2/5

The tool set has significant gaps for a leave management system. It includes apply, balance, and history but misses critical operations such as update_leave, delete_leave, list_pending_requests, or approve_leave. This incomplete coverage will likely cause agent failures in real-world workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    D
    quality
    D
    maintenance
    A Model Context Protocol server that enables Claude Desktop to access structured employee data and perform HR operations including employee lookups, searches, and global leave requests.
    3
    1
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    A Model Context Protocol server that enables Claude to interact with a Lucca instance to list employees, departments, and view absences in natural language.
    3
    MIT

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/umamaheswararao04/leavemanager-mcp-server'

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