Leave Manager MCP Server
Leave Manager MCP Server
Un servidor de Model Context Protocol (MCP) personalizado construido con TypeScript para gestionar operaciones relacionadas con permisos de empleados a través de clientes de IA como Claude Desktop.
Este proyecto está actualmente diseñado para desarrollo y pruebas internas y utiliza una base de datos ficticia/en memoria en lugar de una base de datos de producción.
La arquitectura está diseñada para que la base de datos ficticia pueda reemplazarse posteriormente por una base de datos real o una API interna de gestión de permisos sin cambiar la interfaz de herramientas MCP.
Índice de contenidos
Descripción general
El servidor MCP de Leave Manager expone funcionalidades de gestión de permisos como herramientas MCP que pueden ser utilizadas por clientes de IA.
Por ejemplo, en lugar de llamar manualmente a una API, un usuario puede preguntar a Claude:
¿Cuántos permisos ocasionales tengo?
Claude puede identificar la herramienta MCP adecuada e invocar:
get_leave_balanceEl servidor MCP procesa la solicitud y devuelve información estructurada que Claude puede utilizar para generar una respuesta en lenguaje natural.
Ejemplo
User
│
│ "How many leaves do I have?"
▼
Claude Desktop
│
│ MCP Tool Call
▼
Leave Manager MCP Server
│
▼
Dummy Database
│
▼
Leave Balance
│
▼
Claude Desktop
│
▼
Natural Language ResponseCaracterísticas
La versión actual proporciona las siguientes herramientas MCP:
Obtener el saldo de permisos de un empleado
Obtener el historial de permisos de un empleado
Obtener los tipos de permisos disponibles
Solicitar un permiso
Cancelar un permiso
Validación de entrada mediante Zod
Base de datos ficticia/en memoria
Implementación en TypeScript
Transporte MCP basado en stdio
Compatibilidad con MCP Inspector
Integración con Claude Desktop
Arquitectura
La arquitectura actual es:
┌──────────────────────┐
│ Claude Desktop │
│ │
│ User Interaction │
└──────────┬───────────┘
│
│ MCP / stdio
▼
┌──────────────────────┐
│ Leave Manager MCP │
│ Server │
│ │
│ MCP Tool Layer │
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ Leave Service │
│ / Repository │
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ Dummy DB │
│ │
│ employees[] │
│ leaveBalances[] │
│ leaveRequests[] │
└──────────────────────┘El servidor utiliza stdio porque Claude Desktop puede iniciar el servidor MCP como un proceso local y comunicarse con él a través de la entrada/salida estándar. El SDK de TypeScript de MCP proporciona serveStdio() para este caso de uso.
Pila tecnológica
Tecnología | Propósito |
TypeScript | Desarrollo de la aplicación |
Node.js | Entorno de ejecución |
npm | Gestión de dependencias |
MCP TypeScript SDK | Implementación del servidor MCP |
Zod | Validación de entrada |
Claude Desktop | Cliente MCP |
MCP Inspector | Pruebas MCP locales |
Base de datos ficticia | Almacenamiento temporal de datos |
El SDK actual de MCP TypeScript v2 es la línea estable del SDK y utiliza @modelcontextprotocol/server.
Requisitos previos
Antes de comenzar, asegúrate de tener instalado lo siguiente.
Related MCP server: Enterprise Data MCP Server
Node.js
Se requiere Node.js 20 o posterior.
Comprueba la versión instalada:
node --versionEjemplo:
v22.9.0Comprueba npm:
npm --versionClaude Desktop
Instala Claude Desktop en tu máquina.
Claude Desktop actuará como cliente MCP e iniciará el servidor MCP de Leave Manager localmente.
Instalación
1. Clonar el repositorio
git clone <YOUR_REPOSITORY_URL>Navega al proyecto:
cd leave-manager-mcp2. Instalar dependencias
Ejecuta:
npm installEl proyecto utiliza el paquete de servidor MCP TypeScript:
npm install @modelcontextprotocol/serverZod se utiliza para validar la entrada de las herramientas:
npm install zodPara el desarrollo con TypeScript:
npm install -D typescript tsx @types/nodeLa configuración oficial del servidor MCP utiliza actualmente Node.js 20+, módulos ES, @modelcontextprotocol/server, Zod y tsx.
Estructura del proyecto
Estructura recomendada del proyecto:
leave-manager-mcp/
│
├── src/
│ │
│ ├── index.ts
│ │
│ ├── data/
│ │ └── dummy-db.ts
│ │
│ ├── models/
│ │ └── leave.ts
│ │
│ ├── repositories/
│ │ └── leave-repository.ts
│ │
│ └── tools/
│ └── leave-tools.ts
│
├── dist/
│
├── package.json
├── package-lock.json
├── tsconfig.json
└── README.mdResponsabilidades
src/index.ts
Crea e inicia el servidor MCP.
src/models/leave.ts
Contiene modelos/interfaces de TypeScript relacionados con empleados y permisos.
src/data/dummy-db.ts
Contiene datos de prueba temporales en memoria.
src/repositories/leave-repository.ts
Proporciona operaciones de acceso a datos.
src/tools/leave-tools.ts
Registra las herramientas MCP que Claude puede invocar.
Configuración
package.json
Una configuración típica:
{
"name": "leave-manager-mcp",
"version": "1.0.0",
"description": "Leave Manager MCP Server",
"type": "module",
"scripts": {
"dev": "tsx src/index.ts",
"build": "tsc",
"start": "node dist/index.js"
},
"dependencies": {
"@modelcontextprotocol/server": "^2.0.0",
"zod": "^4.0.0"
},
"devDependencies": {
"@types/node": "^24.0.0",
"tsx": "^4.0.0",
"typescript": "^6.0.0"
}
}Las versiones de las dependencias pueden variar según el momento en que se ejecute
npm install. Siempre se deben preferir las versiones generadas por npm.
Configuración de TypeScript
Crea tsconfig.json:
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"types": ["node"],
"outDir": "dist"
},
"include": [
"src/**/*.ts"
]
}La entrada de tipos de Node es importante con las versiones actuales de TypeScript porque las definiciones de tipos publicadas del SDK de MCP hacen referencia a las API de Node.
Herramientas MCP disponibles
El servidor MCP de Leave Manager actual expone las siguientes herramientas.
1. get_leave_balance
Devuelve el saldo de permisos actual de un empleado.
Entrada
{
"employeeId": "EMP001"
}Ejemplo de resultado
{
"employeeId": "EMP001",
"casual": 8,
"sick": 5,
"earned": 12,
"unpaid": 0
}2. get_leave_history
Devuelve el historial de permisos de un empleado.
Entrada
{
"employeeId": "EMP001"
}Ejemplo de resultado
[
{
"id": "LR001",
"employeeId": "EMP001",
"leaveType": "CASUAL",
"startDate": "2026-08-20",
"endDate": "2026-08-21",
"reason": "Personal work",
"status": "APPROVED"
}
]3. get_leave_types
Devuelve los tipos de permisos disponibles.
Ejemplo de resultado
[
{
"type": "CASUAL",
"description": "Casual leave"
},
{
"type": "SICK",
"description": "Sick leave"
},
{
"type": "EARNED",
"description": "Earned leave"
},
{
"type": "UNPAID",
"description": "Unpaid leave"
}
]4. apply_leave
Crea una nueva solicitud de permiso.
Entrada
{
"employeeId": "EMP001",
"leaveType": "CASUAL",
"startDate": "2026-09-10",
"endDate": "2026-09-11",
"reason": "Family function"
}Ejemplo de resultado
{
"id": "LR002",
"employeeId": "EMP001",
"leaveType": "CASUAL",
"startDate": "2026-09-10",
"endDate": "2026-09-11",
"reason": "Family function",
"status": "PENDING"
}5. cancel_leave
Cancela una solicitud de permiso existente.
Entrada
{
"leaveId": "LR002"
}Ejemplo de resultado
{
"id": "LR002",
"status": "CANCELLED"
}Ejecutar el servidor MCP
Hay dos formas de ejecutar el servidor durante el desarrollo.
Opción 1: Ejecutar directamente con tsx
Esto se recomienda durante el desarrollo.
npm run devInternamente esto ejecuta:
tsx src/index.tsDeberías ver:
Leave Manager MCP server running...El proceso seguirá ejecutándose porque un servidor MCP stdio espera a que un cliente se comunique con él.
Detén el servidor con:
Ctrl + CCompilar el proyecto
Antes de utilizar la versión compilada, ejecuta:
npm run buildEsto ejecuta:
tscLos archivos JavaScript compilados se generarán dentro de:
dist/Estructura esperada:
dist/
├── index.js
├── data/
│ └── dummy-db.js
├── models/
│ └── leave.js
├── repositories/
│ └── leave-repository.js
└── tools/
└── leave-tools.jsEjecutar la compilación de producción
Después de compilar:
npm startEsto ejecuta:
node dist/index.jsEl servidor MCP se iniciará utilizando el JavaScript compilado.
Probar con MCP Inspector
Antes de conectar el servidor a Claude Desktop, se recomienda probarlo con MCP Inspector.
MCP Inspector proporciona una interfaz de usuario local para conectarse a un servidor MCP e invocar directamente sus herramientas.
Iniciar Inspector
Desde la raíz del proyecto:
npx @modelcontextprotocol/inspector npm run devAlternativamente:
npx @modelcontextprotocol/inspector npx tsx src/index.tsInspector proporcionará una URL de navegador.
Abre esa URL en tu navegador.
Probar herramientas en MCP Inspector
Después de conectar el servidor, abre la sección:
ToolsDeberías ver:
get_leave_balance
get_leave_history
get_leave_types
apply_leave
cancel_leaveProbar get_leave_balance
Selecciona:
get_leave_balanceProporciona:
{
"employeeId": "EMP001"
}Respuesta esperada:
{
"employeeId": "EMP001",
"casual": 8,
"sick": 5,
"earned": 12,
"unpaid": 0
}Probar get_leave_history
Entrada:
{
"employeeId": "EMP001"
}Probar get_leave_types
Esta herramienta no requiere ninguna entrada.
Probar apply_leave
Entrada:
{
"employeeId": "EMP001",
"leaveType": "CASUAL",
"startDate": "2026-09-10",
"endDate": "2026-09-11",
"reason": "Family function"
}Probar cancel_leave
Entrada:
{
"leaveId": "LR002"
}Conectar con Claude Desktop
Una vez que el servidor funcione correctamente en MCP Inspector, conéctalo a Claude Desktop.
El servidor MCP debe configurarse como un servidor stdio local porque Claude Desktop inicia el proceso y se comunica a través de stdin/stdout.
1. Compilar el proyecto
Primero ejecuta:
npm run buildAsegúrate de que este archivo exista:
dist/index.js2. Obtener la ruta absoluta del proyecto
Desde la raíz del proyecto:
pwdEjemplo:
/Users/ashish/projects/leave-manager-mcpPor lo tanto, la ruta de tu servidor será:
/Users/ashish/projects/leave-manager-mcp/dist/index.jsUtiliza una ruta absoluta en la configuración de Claude Desktop.
Configuración de Claude Desktop
Añade el servidor MCP de Leave Manager a la configuración MCP de Claude Desktop.
Ejemplo:
{
"mcpServers": {
"leave-manager": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/leave-manager-mcp/dist/index.js"
]
}
}
}Por ejemplo, en macOS:
{
"mcpServers": {
"leave-manager": {
"command": "node",
"args": [
"/Users/ashish/projects/leave-manager-mcp/dist/index.js"
]
}
}
}Reemplaza la ruta con la ruta absoluta real de tu máquina.
Importante: Reiniciar Claude Desktop
Después de cambiar la configuración MCP:
Guarda la configuración.
Cierra completamente Claude Desktop.
Inicia Claude Desktop de nuevo.
Abre una nueva conversación.
Comprueba las herramientas MCP disponibles.
Deberías ver el servidor Leave Manager y sus herramientas.
Probar Leave Manager con Claude
Una vez conectado, no necesitas invocar manualmente las herramientas MCP.
Puedes simplemente hacer preguntas en lenguaje natural a Claude.
Ejemplo 1 — Saldo de permisos
Pregunta:
How many leaves does EMP001 have?Claude debería utilizar:
get_leave_balancecon:
{
"employeeId": "EMP001"
}Ejemplo 2 — Historial de permisos
Pregunta:
Show me the leave history of EMP001.Claude debería utilizar:
get_leave_historyEjemplo 3 — Tipos de permisos disponibles
Pregunta:
What types of leaves are available?Claude debería utilizar:
get_leave_typesEjemplo 4 — Solicitar un permiso
Pregunta:
Apply casual leave for EMP001 from September 10 to September 11 because of a family function.Claude debería utilizar:
apply_leavecon los parámetros adecuados.
Ejemplo 5 — Cancelar un permiso
Pregunta:
Cancel leave request LR002.Claude debería utilizar:
cancel_leaveBase de datos ficticia
La implementación actual utiliza una base de datos en memoria.
Ejemplo:
export const employees = [
{
id: "EMP001",
name: "Ashish Kushwaha",
email: "ashish@example.com",
department: "Engineering"
}
];Saldo de permisos:
export const leaveBalances = [
{
employeeId: "EMP001",
casual: 8,
sick: 5,
earned: 12,
unpaid: 0
}
];Solicitudes de permiso:
export const leaveRequests = [
{
id: "LR001",
employeeId: "EMP001",
leaveType: "CASUAL",
startDate: "2026-08-20",
endDate: "2026-08-21",
reason: "Personal work",
status: "APPROVED",
createdAt: "2026-08-10"
}
];Limitación importante de la base de datos ficticia
La base de datos actual se almacena en la memoria de la aplicación.
Por lo tanto:
Server starts
↓
Dummy data loaded
↓
Apply leave
↓
New request added
↓
Server stops
↓
Data is lostEsto es esperado.
La base de datos ficticia está destinada únicamente al desarrollo y a las pruebas MCP.
Flujo de trabajo de desarrollo
Flujo de trabajo de desarrollo recomendado:
1. Modify TypeScript
↓
2. Run npm run build
↓
3. Run MCP Inspector
↓
4. Test MCP tools
↓
5. Fix issues
↓
6. Test with Claude Desktop
↓
7. Commit changesDurante el desarrollo también puedes utilizar:
npm run deven lugar de compilar después de cada cambio.
Registro de logs
Debido a que el servidor utiliza stdio, no utilices console.log() para el registro normal del servidor.
Evita:
console.log("Server started");Utiliza:
console.error("Server started");La razón es que stdout se utiliza para la comunicación del protocolo MCP. Escribir logs normales en stdout puede corromper el flujo de comunicación JSON-RPC/MCP.
Solución de problemas
Problema: Cannot find module
Ejecuta:
rm -rf node_modules
rm -f package-lock.json
npm installDespués:
npm run buildProblema: Error de compilación de TypeScript
Ejecuta:
npx tsc --noEmitEsto mostrará los errores de TypeScript sin generar archivos.
Problema: dist/index.js no existe
Ejecuta:
npm run buildDespués verifica:
ls distProblema: Claude Desktop no muestra el servidor MCP
Comprueba:
Que la configuración MCP sea JSON válido.
Que la ruta a
dist/index.jssea absoluta.Que
npm run buildse haya completado correctamente.Que
dist/index.jsexista.Que Node.js esté instalado.
Que Claude Desktop se haya reiniciado por completo.
Que el servidor MCP funcione en MCP Inspector.
Problema: MCP Inspector no puede conectarse
Primero ejecuta:
npm run devSi el servidor se inicia correctamente, detenlo y después ejecuta:
npx @modelcontextprotocol/inspector npm run devRevisa la terminal para ver los errores.
Problema: El servidor se inicia pero las herramientas no son visibles
Comprueba:
src/index.tsy asegúrate de que tus herramientas estén registradas:
registerLeaveTools(
server,
repository
);También asegúrate de que se llame a serveStdio():
void serveStdio(createServer);Problema: Errores de protocolo JSON-RPC/MCP
Revisa el código en busca de:
console.log(...)Reemplaza el registro normal con:
console.error(...)stdout debe permanecer disponible para la comunicación del protocolo MCP.
Mejoras futuras
La versión actual es un prototipo. Se recomiendan las siguientes mejoras.
Base de datos
Reemplaza la base de datos ficticia con:
PostgreSQL
MySQL
MongoDBo una API interna existente de gestión de permisos.
Autenticación
Añade autenticación de empleados para que el usuario no tenga que proporcionar:
employeeIdmanualmente.
Arquitectura futura:
Claude
↓
MCP Server
↓
Authentication
↓
Employee Context
↓
Leave ServiceValidación de permisos
Añade reglas de negocio:
Validar fechas de permiso
Validar saldo de permisos
Evitar solapamiento de permisos
Comprobar días festivos de la empresa
Comprobar fines de semana
Validar duración mínima/máxima del permiso
Validar el estado del empleado
Validar el tipo de permiso
Evitar la cancelación después de la aprobación, si corresponde
Aprobación del responsable
Añade herramientas como:
get_pending_leave_requests
approve_leave
reject_leaveCalendario del equipo
Añade:
get_team_leave_calendarEjemplo de solicitud de usuario:
Who from my team is on leave next week?Notificaciones
Integra con:
Email
Slack
Microsoft Teamspara notificar a empleados y responsables.
Arquitectura de producción recomendada
La arquitectura a largo plazo debe separar MCP de la lógica de negocio:
Claude Desktop
│
│ MCP
▼
┌───────────────────┐
│ MCP Server │
│ │
│ Tool Definitions │
│ Input Validation │
└─────────┬─────────┘
│
▼
┌───────────────────┐
│ Leave Service │
│ │
│ Business Rules │
│ Validation │
│ Authorization │
└─────────┬─────────┘
│
▼
┌───────────────────┐
│ Leave Repository │
└─────────┬─────────┘
│
┌────────┴────────┐
▼ ▼
Internal Leave API DatabaseEsto permite reemplazar la base de datos ficticia sin cambiar las herramientas expuestas a Claude.
Consideraciones de seguridad
El proyecto actual está destinado únicamente a desarrollo/pruebas.
Antes de utilizarlo con datos reales de empleados:
Añadir autenticación.
Añadir autorización.
No confiar en el
employeeIdproporcionado por el modelo.Validar todas las entradas de las herramientas.
Proteger la información de los empleados.
Evitar exponer datos innecesarios de los empleados.
Añadir registro de auditoría.
Implementar control de acceso basado en roles.
Proteger las operaciones exclusivas de los gerentes.
Añadir limitación de frecuencia cuando corresponda.
No almacenar secretos en el código fuente.
Usar variables de entorno para las credenciales.
Asegurar las conexiones a APIs/bases de datos internas.
El servidor MCP debe aplicar los permisos de negocio en lugar de depender de Claude para tomar decisiones de seguridad.
Variables de entorno
Al conectarse a servicios reales, use variables de entorno.
Ejemplo de .env:
LEAVE_API_URL=https://internal.example.com/api
LEAVE_API_KEY=your-api-keyNo haga commit de .env en Git.
Añada:
.enva .gitignore.
Ignorar con Git
.gitignore recomendado:
node_modules/
dist/
.env
.DS_Store
*.logComandos útiles
Instalar dependencias
npm installDesarrollo
npm run devCompilar
npm run buildEjecutar el servidor compilado
npm startComprobación de tipos
npx tsc --noEmitEjecutar MCP Inspector
npx @modelcontextprotocol/inspector npm run devComprobar la versión de Node
node --versionComprobar la versión de npm
npm --versionLista de comprobación de desarrollo de MCP
Antes de considerar que el servidor MCP está listo para las pruebas internas:
Node.js 20+ instalado
Dependencias instaladas
La compilación de TypeScript se realiza correctamente
Base de datos de prueba configurada
El servidor MCP se inicia correctamente
MCP Inspector se conecta correctamente
get_leave_balanceprobadoget_leave_historyprobadoget_leave_typesprobadoapply_leaveprobadocancel_leaveprobadoConfiguración de Claude Desktop añadida
Claude Desktop reiniciado
Herramientas de Leave Manager visibles en Claude
Solicitudes en lenguaje natural probadas
Escenarios de error probados
Ejemplos de consultas de usuario
Una vez conectados a Claude Desktop, los usuarios deberían poder hacer preguntas como:
How many casual leaves do I have?Show my leave history.What leave types are available?Apply casual leave from September 10 to September 11.Cancel my leave request LR002.Ejemplos futuros:
Do I have enough leave for next Monday?Who from my team is on leave next week?Show all pending leave requests.Approve Rahul's leave request.Recursos de MCP
SDK oficial de MCP para TypeScript:
https://ts.sdk.modelcontextprotocol.io/v2/
Guía oficial del primer servidor:
https://ts.sdk.modelcontextprotocol.io/v2/get-started/first-server
API oficial del servidor:
https://ts.sdk.modelcontextprotocol.io/v2/api/@modelcontextprotocol/server/
El proyecto sigue actualmente la arquitectura del SDK de MCP para TypeScript v2 y la línea de protocolo moderna 2026-07-28.
Licencia
Este proyecto está destinado al desarrollo y las pruebas internas.
Añada aquí la licencia y la política de uso de su organización.
Mantenedor
Ashish Kushwaha
Leave Manager MCP Server TypeScript + MCP + Claude Desktop
Inicio rápido
Para desarrolladores experimentados, la configuración completa se puede resumir como:
# Clone
git clone <YOUR_REPOSITORY_URL>
# Enter project
cd leave-manager-mcp
# Install
npm install
# Build
npm run build
# Run
npm start
# Development
npm run dev
# MCP Inspector
npx @modelcontextprotocol/inspector npm run devA continuación, configure Claude Desktop para que se inicie:
dist/index.jsusando:
{
"mcpServers": {
"leave-manager": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/leave-manager-mcp/dist/index.js"
]
}
}
}Reinicie Claude Desktop y comience a probar las herramientas MCP de Leave Manager.
Available Tools
6 toolsapply_leaveC
Apply for leave for an employee.
| Name | Required | Description | Default |
|---|---|---|---|
| reason | Yes | ||
| endDate | Yes | ||
| leaveType | Yes | ||
| startDate | Yes | ||
| employeeId | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the burden of explaining behavior. It only states that leave is applied for, but does not disclose side effects, potential validations, approval implications, or return behavior. This is insufficient for a mutation tool.
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 one-line description is clear and front-loaded, with no filler or redundant phrasing. It is short and easy to parse, though its brevity sacrifices important operational details.
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?
Given that this is a 5-required-parameter mutation tool with no annotations, output schema, or parameter explanations, the description is not sufficient to support correct invocation. It captures the core action but leaves critical operational context undocumented.
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?
With 0% schema description coverage and no mention of parameters in the description, the agent receives no additional semantic meaning. The schema provides names and types, but nothing explains date formats, reason expectations, or how the employeeId is resolved.
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 'Apply for leave for an employee' uses a specific verb and resource, clearly communicating what the tool does. It also distinguishes itself from the sibling read and cancel tools by indicating the creation/submission action.
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 gives no explicit guidance on when to use this tool versus the sibling tools, nor does it mention prerequisites or exclusions. Usage can only be inferred from the action itself, making this a weak dimension.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cancel_leaveC
Cancel an existing leave request.
| Name | Required | Description | Default |
|---|---|---|---|
| leaveId | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description must carry full burden. 'Cancel' implies a mutation, but it doesn't disclose side effects (e.g., whether the cancellation is irreversible, whether it requires special permissions, how it affects leave balance). Does not contradict any annotations since none exist.
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 sentence, perfectly concise. No fluff, front-loaded action. It serves the purpose with minimal words.
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?
Given a mutation tool with no annotations and no output schema, the description is lacking. It doesn't mention expected outcome, error conditions, or anything about the cancellation process. For a simple tool with one param, it is minimal but functional, yet incomplete in providing useful context.
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%, meaning the description doesn't explain the leaveId parameter beyond its name from the schema. The description simply says 'an existing leave request' without adding meaning like what the ID format is or where to find it. With 0% coverage, the description must compensate, but it does not.
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?
Clear verb+resource: 'Cancel an existing leave request.' It specifies the action and object, and while it doesn't explicitly differentiate from siblings, the sibling tools like apply_leave and get_leave_history are distinct. It is direct and unambiguous.
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 guidance on when to use this tool versus alternatives. It doesn't mention any conditions for cancellation, such as approval status or time limitations. The context is implied but not stated, so no exclusions or alternative references.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_employee_details_by_employeeIdC
Get employee details by employeeId.
| Name | Required | Description | Default |
|---|---|---|---|
| employeeId | 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. It does not disclose any behavioral traits such as whether it is read-only, side effects, authentication requirements, or error handling. For a get operation, it implies read-only but does not state it, and no output schema is provided, leaving behavior largely opaque.
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 description is extremely short (5 words), which could be considered concise, but it under-specifies rather than being efficiently informative. It is front-loaded with the purpose, but the brevity results in missing critical information, making it insufficient.
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?
The tool has one parameter, no output schema, and no annotations. Given this, the description should at least indicate what 'employee details' entails (e.g., which fields are returned) and any special cases. It does not, so it is incomplete for practical use.
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%: the parameter employeeId has no description in the schema. The tool description repeats 'by employeeId' but adds no additional meaning. Given low coverage, the description should compensate but does not clarify format (e.g., UUID, string) or any constraints.
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 it retrieves employee details by employeeId, which is a clear verb+resource+identifier. However, it lacks differentiation from sibling tools (e.g., get_leave_balance, apply_leave) which are about leave, not employee details, so there is some implicit distinction. It is not a tautology but is minimal.
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 usage guidelines are provided. The description does not specify when to use this tool versus alternatives, but since it is the only employee details tool among leave-focused siblings, the usage context is somewhat implied. Still, no explicit guidance for when-not-to-use or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_leave_balanceC
Get the current leave balance of an employee.
| Name | Required | Description | Default |
|---|---|---|---|
| employeeId | 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 only states the action without explaining what the tool returns, whether it requires specific permissions, or any side effects. For a read operation, it doesn't mention the output format or any limitations.
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 description is a single, concise sentence that is front-loaded with the main action. It is appropriately brief, though it could add a bit more detail without becoming verbose.
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?
Given the tool's simplicity (one parameter, no output schema), the description is minimal but lacks important context such as what the balance includes (e.g., annual, sick, etc.) or any time-based considerations. It is adequate for a basic read but incomplete for an agent to fully understand the tool's behavior.
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 schema has 0% description coverage, and the description doesn't explain the 'employeeId' parameter beyond its name. However, with only one parameter and a clear name, the meaning is fairly obvious. The description adds no extra semantic value, but the parameter is self-explanatory.
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 clearly states the tool's purpose: to retrieve the current leave balance for an employee. It uses a specific verb ('get') and resource ('leave balance'), and it is distinct from sibling tools like get_leave_history and get_leave_types, though it doesn't explicitly differentiate itself.
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 provides no guidance on when to use this tool versus alternatives. It doesn't mention any context, prerequisites, or exclusions. The sibling tools suggest related but different functions, but the description doesn't clarify when to choose this one.
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 the leave history of an employee.
| Name | Required | Description | Default |
|---|---|---|---|
| employeeId | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations at all, so the description carries full burden. It only says 'get' implying a read, but does not disclose return format, whether it includes only approved leaves, date ranges, or any limits. It gives no behavioral details beyond the verb.
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 description is very short, one line, and front-loaded with the purpose. It is concise, but it is under-specified rather than efficiently concise. Since it avoids fluff, it at least earns a baseline for conciseness.
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?
Given there is no output schema and no annotations, the description is insufficient. It does not explain what 'history' includes, whether there are any filters, pagination, or typical use cases. The complexity is moderate but the description is too thin to be complete.
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 the single parameter employeeId. The description does not elaborate on what employeeId is or any format requirements. It merely repeats the parameter name implicitly. The description adds minimal value beyond the schema.
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 'Get the leave history of an employee' which is a clear verb+resource. It distinguishes from siblings like get_leave_balance (which implies current balance) and apply_leave, but does not explicitly differentiate what 'history' includes (e.g., past applications, approved leaves, status over time). It is acceptable but lacks specifics.
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 guidance on when to use this tool vs alternatives. It doesn't mention that this is for historical records, nor does it contrast with get_leave_balance for current entitlements. The agent must infer usage from the 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_typesA
Get all available leave types.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It only states the action without mentioning side effects, authentication requirements, or whether it is a read-only operation. For a simple list tool, the lack of such disclosure is a gap, though the risk is low.
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, clear sentence that conveys the entire purpose without any filler or unnecessary details. Perfectly concise and front-loaded.
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?
Given the tool's simplicity (no parameters, no output schema, no nested objects), the description is adequate. It covers the core purpose and does not leave critical gaps, though it could mention the return format or any filtering options for completeness.
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 has zero parameters, so the schema provides all necessary context. Per the baseline rule, a score of 4 is appropriate; the description adds no parameter-specific information, but none is needed.
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 'Get all available leave types' uses a specific verb ('Get') and resource ('leave types'), and clearly distinguishes from sibling tools like get_leave_balance or get_leave_history which deal with specific aspects of leave. It is unambiguous about what it returns.
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 states what the tool does but provides no guidance on when to use it versus alternatives. However, since the tool is a simple list operation with a unique purpose, the intended usage is easily inferred, though not explicit.
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
v1.0.0- First observed
apply_leave - First observed
cancel_leave - First observed
get_employee_details_by_employeeId - First observed
get_leave_balance - First observed
get_leave_history - First observed
get_leave_types
TDQS
Scored across 6 tools
The tools are mostly distinct: balance, history, types, apply, cancel, and employee details each target a clear purpose. The only mild overlap is between leave balance and leave history, but their intent is sufficiently separated.
Most tools follow a get_/apply_/cancel_ pattern with snake_case. The outlier is get_employee_details_by_employeeId which mixes an 'employeeId' camelCase segment into an otherwise snake_case name, causing a minor inconsistency.
Six tools is well-scoped for a leave management server. Each tool covers an essential function without unnecessary bloat or significant redundancy.
The core employee self-service workflow is covered: view balance, history, types, apply, and cancel. Missing tools for approval/rejection or checking pending leave requests create notable gaps for a 'manager' context.
Maintenance
Related MCP Connectors
- mcp-serverOAuthio.klokin
MCP server exposing klokin time-tracking operations (employees, time entries, stores) to AI clients.
MCP server for public_holidays_mcp
- mcpOAuthcom.gibsonai
GibsonAI MCP server: manage your databases with natural language
MCP server providing attendance data queries via the CloudTime API.
Related MCP Servers
- FlicenseBqualityDmaintenanceA Model Context Protocol server that enables users to manage employee leave through natural language. It provides tools to check leave balances, apply for leave, and view leave history via Claude integration.3-
- AlicenseNot gradedqualityDmaintenanceMCP server providing natural-language tools for managing and querying an employee database, including user CRUD, search, and statistics.MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server for interacting with an HR database, enabling querying employee data and HR operations via natural language.-
- FlicenseNot gradedqualityDmaintenanceEnables natural-language-based employee leave management including leave balance checks, leave applications, approvals, and history retrieval through an MCP-compatible client.-