Leave Manager MCP Server
Leave Manager MCP Server
Claude Desktop などの AI クライアントを介して従業員の休暇関連の操作を管理するための、TypeScript で構築されたカスタム Model Context Protocol (MCP) サーバーです。
このプロジェクトは現在 社内での開発およびテスト を目的としており、本番データベースの代わりに ダミー / インメモリデータベース を使用しています。
アーキテクチャは、MCP ツールのインターフェースを変更することなく、ダミーデータベースを後で実際のデータベースや社内の休暇管理 API に置き換えられるように設計されています。
目次
概要
Leave Manager MCP Server は、休暇管理機能を MCP ツールとして公開し、AI クライアントが利用できるようにします。
たとえば、ユーザーは 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 による実装
stdio ベースの MCP トランスポート
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() を提供しています。
技術スタック
Technology | 目的 |
TypeScript | アプリケーション開発 |
Node.js | ランタイム |
npm | 依存関係の管理 |
MCP TypeScript SDK | MCP サーバーの実装 |
Zod | 入力検証 |
Claude Desktop | MCP クライアント |
MCP Inspector | ローカルでの MCP テスト |
Dummy DB | 一時的なデータ保存 |
現在の MCP TypeScript SDK v2 は安定版の SDK ラインであり、@modelcontextprotocol/server を使用しています。
前提条件
開始する前に、以下がインストールされていることを確認してください。
Related MCP server: Enterprise Data MCP Server
Node.js
Node.js 20 以降 が必要です。
インストールされているバージョンを確認します:
node --version例:
v22.9.0npm を確認します:
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 サーバーパッケージを使用します:
npm install @modelcontextprotocol/serverZod はツールの入力を検証するために使用されます:
npm install zodTypeScript 開発用:
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
Claude が呼び出せる MCP ツールを登録します。
設定
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 サーバーの実行
開発中にサーバーを実行する方法は 2 つあります。
オプション 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 サーバーに接続してツールを直接呼び出すためのローカル UI を提供します。
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_leaveget_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.jsClaude Desktop の設定では 絶対パス を使用します。
Claude Desktop の設定
Leave Manager MCP サーバーを Claude Desktop の MCP 設定に追加します。
例:
{
"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 サーバーとそのツールが表示されるはずです。
Claude で Leave Manager をテストする
接続後、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"
}
];ダミー DB の重要な制限事項
現在のデータベースはアプリケーションのメモリ内に保存されます。
したがって:
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 の無視設定
推奨される .gitignore:
node_modules/
dist/
.env
.DS_Store
*.log便利なコマンド
依存関係のインストール
npm install開発
npm run devビルド
npm run buildコンパイル済みサーバーの実行
npm start型チェック
npx tsc --noEmitMCP Inspector の実行
npx @modelcontextprotocol/inspector npm run devNode バージョンの確認
node --versionnpm バージョンの確認
npm --versionMCP 開発チェックリスト
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.-