Leave Manager MCP Server
Leave Manager MCP Server
Пользовательский сервер Model Context Protocol (MCP), созданный на TypeScript для управления операциями, связанными с отпусками сотрудников, через таких ИИ-клиентов, как Claude Desktop.
Этот проект в настоящее время предназначен для внутренней разработки и тестирования и использует фиктивную/внутрипроцессную базу данных вместо производственной базы данных.
Архитектура спроектирована таким образом, чтобы фиктивную базу данных можно было позже заменить на реальную базу данных или внутренний API управления отпусками без изменения интерфейса инструментов MCP.
Оглавление
Обзор
Сервер Leave Manager MCP предоставляет функциональность управления отпусками в виде MCP-инструментов, которые могут использоваться ИИ-клиентами.
Например, вместо ручного вызова API пользователь может спросить у Claude:
Сколько у меня отпусков за свой счёт?
Claude может определить подходящий MCP-инструмент и вызвать:
get_leave_balanceMCP-сервер обрабатывает запрос и возвращает структурированную информацию, которую Claude может использовать для формирования ответа на естественном языке.
Пример
User
│
│ "How many leaves do I have?"
▼
Claude Desktop
│
│ MCP Tool Call
▼
Leave Manager MCP Server
│
▼
Dummy Database
│
▼
Leave Balance
│
▼
Claude Desktop
│
▼
Natural Language ResponseВозможности
Текущая версия предоставляет следующие MCP-инструменты:
Получение остатка отпуска сотрудника
Получение истории отпусков сотрудника
Получение доступных типов отпусков
Подача заявки на отпуск
Отмена отпуска
Проверка входных данных с помощью Zod
Фиктивная/внутрипроцессная база данных
Реализация на TypeScript
Транспорт MCP на основе stdio
Поддержка MCP Inspector
Интеграция с Claude Desktop
Архитектура
Текущая архитектура:
┌──────────────────────┐
│ Claude Desktop │
│ │
│ User Interaction │
└──────────┬───────────┘
│
│ MCP / stdio
▼
┌──────────────────────┐
│ Leave Manager MCP │
│ Server │
│ │
│ MCP Tool Layer │
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ Leave Service │
│ / Repository │
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ Dummy DB │
│ │
│ employees[] │
│ leaveBalances[] │
│ leaveRequests[] │
└──────────────────────┘Сервер использует stdio, потому что Claude Desktop может запустить MCP-сервер как локальный процесс и общаться с ним через стандартный ввод/вывод. MCP TypeScript SDK предоставляет serveStdio() для этого случая.
Технологический стек
Технология | Назначение |
TypeScript | Разработка приложения |
Node.js | Среда выполнения |
npm | Управление зависимостями |
MCP TypeScript SDK | Реализация MCP-сервера |
Zod | Проверка входных данных |
Claude Desktop | MCP-клиент |
MCP Inspector | Локальное тестирование MCP |
Фиктивная БД | Временное хранение данных |
Текущий MCP TypeScript SDK v2 — это стабильная линия SDK, использующая @modelcontextprotocol/server.
Предварительные требования
Перед началом убедитесь, что установлено следующее.
Related MCP server: Enterprise Data MCP Server
Node.js
Требуется Node.js 20 или новее.
Проверьте установленную версию:
node --versionПример:
v22.9.0Проверьте npm:
npm --versionClaude Desktop
Установите Claude Desktop на свой компьютер.
Claude Desktop будет выступать в роли MCP-клиента и запустит сервер Leave Manager MCP локально.
Установка
1. Клонируйте репозиторий
git clone <YOUR_REPOSITORY_URL>Перейдите в проект:
cd leave-manager-mcp2. Установите зависимости
Выполните:
npm installПроект использует пакет MCP TypeScript server:
npm install @modelcontextprotocol/serverZod используется для проверки входных данных инструментов:
npm install zodДля разработки на TypeScript:
npm install -D typescript tsx @types/nodeОфициальная настройка MCP-сервера в настоящее время использует Node.js 20+, ES-модули, @modelcontextprotocol/server, Zod и tsx.
Структура проекта
Рекомендуемая структура проекта:
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.mdОбязанности
src/index.ts
Создаёт и запускает MCP-сервер.
src/models/leave.ts
Содержит TypeScript-модели/интерфейсы, связанные с сотрудниками и отпусками.
src/data/dummy-db.ts
Содержит временные тестовые данные в памяти.
src/repositories/leave-repository.ts
Предоставляет операции доступа к данным.
src/tools/leave-tools.ts
Регистрирует MCP-инструменты, которые может вызывать Claude.
Конфигурация
package.json
Типовая конфигурация:
{
"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"
}
}Версии зависимостей могут отличаться в зависимости от того, когда выполняется
npm install. Всегда предпочитайте версии, сгенерированные npm.
Конфигурация TypeScript
Создайте tsconfig.json:
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"types": ["node"],
"outDir": "dist"
},
"include": [
"src/**/*.ts"
]
}Запись Node types важна для текущих версий TypeScript, поскольку опубликованные определения типов MCP SDK ссылаются на Node API.
Доступные MCP-инструменты
Текущий сервер Leave Manager MCP предоставляет следующие инструменты.
1. get_leave_balance
Возвращает текущий остаток отпуска сотрудника.
Входные данные
{
"employeeId": "EMP001"
}Пример результата
{
"employeeId": "EMP001",
"casual": 8,
"sick": 5,
"earned": 12,
"unpaid": 0
}2. get_leave_history
Возвращает историю отпусков сотрудника.
Входные данные
{
"employeeId": "EMP001"
}Пример результата
[
{
"id": "LR001",
"employeeId": "EMP001",
"leaveType": "CASUAL",
"startDate": "2026-08-20",
"endDate": "2026-08-21",
"reason": "Personal work",
"status": "APPROVED"
}
]3. get_leave_types
Возвращает доступные типы отпусков.
Пример результата
[
{
"type": "CASUAL",
"description": "Casual leave"
},
{
"type": "SICK",
"description": "Sick leave"
},
{
"type": "EARNED",
"description": "Earned leave"
},
{
"type": "UNPAID",
"description": "Unpaid leave"
}
]4. apply_leave
Создаёт новый запрос на отпуск.
Входные данные
{
"employeeId": "EMP001",
"leaveType": "CASUAL",
"startDate": "2026-09-10",
"endDate": "2026-09-11",
"reason": "Family function"
}Пример результата
{
"id": "LR002",
"employeeId": "EMP001",
"leaveType": "CASUAL",
"startDate": "2026-09-10",
"endDate": "2026-09-11",
"reason": "Family function",
"status": "PENDING"
}5. cancel_leave
Отменяет существующий запрос на отпуск.
Входные данные
{
"leaveId": "LR002"
}Пример результата
{
"id": "LR002",
"status": "CANCELLED"
}Запуск MCP-сервера
Во время разработки есть два способа запустить сервер.
Вариант 1: Запуск напрямую с помощью tsx
Рекомендуется во время разработки.
npm run devВнутри это выполняет:
tsx src/index.tsВы должны увидеть:
Leave Manager MCP server running...Процесс продолжит работу, потому что stdio MCP-сервер ожидает клиента для связи.
Остановите сервер с помощью:
Ctrl + CСборка проекта
Перед использованием скомпилированной версии выполните:
npm run buildЭто выполняет:
tscСкомпилированные JavaScript-файлы будут созданы внутри:
dist/Ожидаемая структура:
dist/
├── index.js
├── data/
│ └── dummy-db.js
├── models/
│ └── leave.js
├── repositories/
│ └── leave-repository.js
└── tools/
└── leave-tools.jsЗапуск производственной сборки
После сборки:
npm startЭто выполняет:
node dist/index.jsMCP-сервер запустится с использованием скомпилированного JavaScript.
Тестирование с MCP Inspector
Перед подключением сервера к Claude Desktop рекомендуется протестировать его с помощью MCP Inspector.
MCP Inspector предоставляет локальный пользовательский интерфейс для подключения к MCP-серверу и непосредственного вызова его инструментов.
Запуск Inspector
Из корня проекта:
npx @modelcontextprotocol/inspector npm run devАльтернативно:
npx @modelcontextprotocol/inspector npx tsx src/index.tsInspector предоставит URL-адрес браузера.
Откройте этот URL-адрес в браузере.
Тестирование инструментов в MCP Inspector
После подключения сервера откройте раздел:
ToolsВы должны увидеть:
get_leave_balance
get_leave_history
get_leave_types
apply_leave
cancel_leaveТест get_leave_balance
Выберите:
get_leave_balanceУкажите:
{
"employeeId": "EMP001"
}Ожидаемый ответ:
{
"employeeId": "EMP001",
"casual": 8,
"sick": 5,
"earned": 12,
"unpaid": 0
}Тест get_leave_history
Входные данные:
{
"employeeId": "EMP001"
}Тест get_leave_types
Этот инструмент не требует ввода данных.
Тест apply_leave
Входные данные:
{
"employeeId": "EMP001",
"leaveType": "CASUAL",
"startDate": "2026-09-10",
"endDate": "2026-09-11",
"reason": "Family function"
}Тест cancel_leave
Входные данные:
{
"leaveId": "LR002"
}Подключение к Claude Desktop
После того как сервер корректно работает в MCP Inspector, подключите его к Claude Desktop.
MCP-сервер следует настроить как локальный stdio-сервер, поскольку Claude Desktop запускает процесс и общается через stdin/stdout.
1. Соберите проект
Сначала выполните:
npm run buildУбедитесь, что этот файл существует:
dist/index.js2. Получите абсолютный путь к проекту
Из корня проекта:
pwdПример:
/Users/ashish/projects/leave-manager-mcpСледовательно, путь к вашему серверу будет:
/Users/ashish/projects/leave-manager-mcp/dist/index.jsИспользуйте абсолютный путь в конфигурации Claude Desktop.
Конфигурация Claude Desktop
Добавьте MCP-сервер Leave Manager в конфигурацию MCP в Claude Desktop.
Пример:
{
"mcpServers": {
"leave-manager": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/leave-manager-mcp/dist/index.js"
]
}
}
}Например, на macOS:
{
"mcpServers": {
"leave-manager": {
"command": "node",
"args": [
"/Users/ashish/projects/leave-manager-mcp/dist/index.js"
]
}
}
}Замените путь на фактический абсолютный путь на вашем компьютере.
Важно: перезапустите Claude Desktop
После изменения конфигурации MCP:
Сохраните конфигурацию.
Полностью закройте Claude Desktop.
Снова запустите Claude Desktop.
Откройте новый чат.
Проверьте доступные MCP-инструменты.
Вы должны увидеть сервер Leave Manager и его инструменты.
Тестирование Leave Manager с Claude
После подключения вам не нужно вручную вызывать MCP-инструменты.
Вы можете просто задавать Claude вопросы на естественном языке.
Пример 1 — остаток отпуска
Спросите:
How many leaves does EMP001 have?Claude должен использовать:
get_leave_balanceс:
{
"employeeId": "EMP001"
}Пример 2 — история отпусков
Спросите:
Show me the leave history of EMP001.Claude должен использовать:
get_leave_historyПример 3 — доступные типы отпусков
Спросите:
What types of leaves are available?Claude должен использовать:
get_leave_typesПример 4 — подача заявки на отпуск
Спросите:
Apply casual leave for EMP001 from September 10 to September 11 because of a family function.Claude должен использовать:
apply_leaveс соответствующими параметрами.
Пример 5 — отмена отпуска
Спросите:
Cancel leave request LR002.Claude должен использовать:
cancel_leaveФиктивная база данных
Текущая реализация использует базу данных в памяти.
Пример:
export const employees = [
{
id: "EMP001",
name: "Ashish Kushwaha",
email: "ashish@example.com",
department: "Engineering"
}
];Остаток отпуска:
export const leaveBalances = [
{
employeeId: "EMP001",
casual: 8,
sick: 5,
earned: 12,
unpaid: 0
}
];Запросы на отпуск:
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"
}
];Важное ограничение фиктивной БД
Текущая база данных хранится в памяти приложения.
Поэтому:
Server starts
↓
Dummy data loaded
↓
Apply leave
↓
New request added
↓
Server stops
↓
Data is lostЭто ожидаемо.
Фиктивная база данных предназначена только для разработки и тестирования MCP.
Рабочий процесс разработки
Рекомендуемый рабочий процесс разработки:
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 changesВо время разработки вы также можете использовать:
npm run devвместо сборки после каждого изменения.
Ведение журнала
Поскольку сервер использует stdio, не используйте console.log() для обычного ведения журнала сервера.
Избегайте:
console.log("Server started");Используйте:
console.error("Server started");Причина в том, что stdout используется MCP для протокольного общения. Запись обычных журналов в stdout может повредить поток JSON-RPC/MCP.
Устранение неполадок
Проблема: Cannot find module
Выполните:
rm -rf node_modules
rm -f package-lock.json
npm installЗатем:
npm run buildПроблема: ошибка сборки TypeScript
Выполните:
npx tsc --noEmitЭто покажет ошибки TypeScript без создания файлов.
Проблема: dist/index.js не существует
Выполните:
npm run buildЗатем проверьте:
ls distПроблема: Claude Desktop не показывает MCP-сервер
Проверьте:
Конфигурация MCP является допустимым JSON.
Путь к
dist/index.jsявляется абсолютным.npm run buildзавершился успешно.dist/index.jsсуществует.Node.js установлен.
Claude Desktop был полностью перезапущен.
MCP-сервер работает в MCP Inspector.
Проблема: MCP Inspector не может подключиться
Сначала выполните:
npm run devЕсли сервер запускается успешно, остановите его, а затем выполните:
npx @modelcontextprotocol/inspector npm run devПроверьте терминал на наличие ошибок.
Проблема: сервер запускается, но инструменты не видны
Проверьте:
src/index.tsи убедитесь, что ваши инструменты зарегистрированы:
registerLeaveTools(
server,
repository
);Также убедитесь, что вызывается serveStdio():
void serveStdio(createServer);Проблема: ошибки протокола JSON-RPC/MCP
Проверьте код на наличие:
console.log(...)Замените обычное ведение журнала на:
console.error(...)stdout должен оставаться доступным для связи по протоколу MCP.
Будущие улучшения
Текущая версия — это прототип. Рекомендуются следующие улучшения.
База данных
Замените фиктивную базу данных на:
PostgreSQL
MySQL
MongoDBили существующий внутренний API управления отпусками.
Аутентификация
Добавьте аутентификацию сотрудников, чтобы пользователю не приходилось вводить:
employeeIdвручную.
Будущая архитектура:
Claude
↓
MCP Server
↓
Authentication
↓
Employee Context
↓
Leave ServiceПроверка отпусков
Добавьте бизнес-правила:
Проверка дат отпуска
Проверка остатка отпуска
Предотвращение пересекающихся отпусков
Проверка корпоративных праздников
Проверка выходных
Проверка минимальной/максимальной продолжительности отпуска
Проверка статуса сотрудника
Проверка типа отпуска
Запрет отмены после утверждения, если применимо
Утверждение руководителем
Добавьте такие инструменты, как:
get_pending_leave_requests
approve_leave
reject_leaveКомандный календарь
Добавьте:
get_team_leave_calendarПример запроса пользователя:
Who from my team is on leave next week?Уведомления
Интегрируйтесь с:
Email
Slack
Microsoft Teamsдля уведомления сотрудников и руководителей.
Рекомендуемая производственная архитектура
Долгосрочная архитектура должна отделять MCP от бизнес-логики:
Claude Desktop
│
│ MCP
▼
┌───────────────────┐
│ MCP Server │
│ │
│ Tool Definitions │
│ Input Validation │
└─────────┬─────────┘
│
▼
┌───────────────────┐
│ Leave Service │
│ │
│ Business Rules │
│ Validation │
│ Authorization │
└─────────┬─────────┘
│
▼
┌───────────────────┐
│ Leave Repository │
└─────────┬─────────┘
│
┌────────┴────────┐
▼ ▼
Internal Leave API DatabaseЭто позволит заменить фиктивную базу данных без изменения инструментов, доступных Claude.
Вопросы безопасности
Текущий проект предназначен только для разработки/тестирования.
Перед использованием с реальными данными сотрудников:
Добавьте аутентификацию.
Добавьте авторизацию.
Не доверяйте
employeeId, предоставленному моделью.Проверяйте все входные данные инструментов.
Защищайте информацию о сотрудниках.
Избегайте раскрытия ненужных данных о сотрудниках.
Добавьте журналирование аудита.
Реализуйте управление доступом на основе ролей.
Защищайте операции, доступные только менеджерам.
Добавьте ограничение частоты запросов, где это применимо.
Не храните секреты в исходном коде.
Используйте переменные окружения для учётных данных.
Обеспечьте безопасность соединений с внутренними API/базами данных.
MCP-сервер должен обеспечивать соблюдение бизнес-разрешений, а не полагаться на Claude при принятии решений по безопасности.
Переменные окружения
При подключении к реальным сервисам используйте переменные окружения.
Пример .env:
LEAVE_API_URL=https://internal.example.com/api
LEAVE_API_KEY=your-api-keyНе коммитьте .env в Git.
Добавьте:
.envв .gitignore.
Git Ignore
Рекомендуемый .gitignore:
node_modules/
dist/
.env
.DS_Store
*.logПолезные команды
Установка зависимостей
npm installРазработка
npm run devСборка
npm run buildЗапуск скомпилированного сервера
npm startПроверка типов
npx tsc --noEmitЗапуск MCP Inspector
npx @modelcontextprotocol/inspector npm run devПроверка версии Node.js
node --versionПроверка версии npm
npm --versionКонтрольный список разработки MCP
Прежде чем считать MCP-сервер готовым к внутреннему тестированию:
Установлен Node.js 20+
Установлены зависимости
Сборка TypeScript проходит успешно
Настроена тестовая база данных
MCP-сервер запускается успешно
MCP Inspector подключается успешно
get_leave_balanceпротестированget_leave_historyпротестированget_leave_typesпротестированapply_leaveпротестированcancel_leaveпротестированДобавлена конфигурация Claude Desktop
Claude Desktop перезапущен
Инструменты Leave Manager видны в Claude
Протестированы запросы на естественном языке
Протестированы сценарии ошибок
Примеры пользовательских запросов
После подключения к Claude Desktop пользователи смогут задавать такие вопросы, как:
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.Будущие примеры:
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.Ресурсы MCP
Официальный MCP TypeScript SDK:
https://ts.sdk.modelcontextprotocol.io/v2/
Официальное руководство по первому серверу:
https://ts.sdk.modelcontextprotocol.io/v2/get-started/first-server
Официальный API сервера:
https://ts.sdk.modelcontextprotocol.io/v2/api/@modelcontextprotocol/server/
Проект в настоящее время следует архитектуре MCP TypeScript SDK v2 и современной линии протокола 2026-07-28.
Лицензия
Этот проект предназначен для внутренней разработки и тестирования.
Добавьте сюда лицензию и политику использования вашей организации.
Сопровождающий
Ashish Kushwaha
Leave Manager MCP Server TypeScript + MCP + Claude Desktop
Быстрый старт
Для опытных разработчиков полную настройку можно кратко описать так:
# 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 devЗатем настройте Claude Desktop для запуска:
dist/index.jsиспользуя:
{
"mcpServers": {
"leave-manager": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/leave-manager-mcp/dist/index.js"
]
}
}
}Перезапустите Claude Desktop и начните тестировать инструменты Leave Manager MCP.
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.-