Leave Manager MCP Server
Leave Manager MCP Server
Ein benutzerdefinierter Model Context Protocol (MCP) Server, erstellt mit TypeScript, für die Verwaltung von Mitarbeiter-Urlaubsoperationen über KI-Clients wie Claude Desktop.
Dieses Projekt ist derzeit für die interne Entwicklung und das Testen konzipiert und verwendet eine Dummy-/In-Memory-Datenbank anstelle einer Produktionsdatenbank.
Die Architektur ist so ausgelegt, dass die Dummy-Datenbank später durch eine echte Datenbank oder eine interne Leave-Management-API ersetzt werden kann, ohne die MCP-Tool-Schnittstelle zu ändern.
Inhaltsverzeichnis
Überblick
Der Leave Manager MCP Server stellt Urlaubsverwaltungsfunktionen als MCP-Tools bereit, die von KI-Clients verwendet werden können.
Anstatt beispielsweise eine API manuell aufzurufen, kann ein Benutzer Claude fragen:
Wie viele Gleittage habe ich?
Claude kann das passende MCP-Tool identifizieren und aufrufen:
get_leave_balanceDer MCP-Server verarbeitet die Anfrage und gibt strukturierte Informationen zurück, die Claude verwenden kann, um eine Antwort in natürlicher Sprache zu generieren.
Beispiel
User
│
│ "How many leaves do I have?"
▼
Claude Desktop
│
│ MCP Tool Call
▼
Leave Manager MCP Server
│
▼
Dummy Database
│
▼
Leave Balance
│
▼
Claude Desktop
│
▼
Natural Language ResponseFunktionen
Die aktuelle Version bietet die folgenden MCP-Tools:
Mitarbeiter-Urlaubssaldo abrufen
Mitarbeiter-Urlaubsverlauf abrufen
Verfügbare Urlaubsarten abrufen
Urlaub beantragen
Urlaub stornieren
Eingabevalidierung mit Zod
Dummy-/In-Memory-Datenbank
TypeScript-Implementierung
stdio-basierter MCP-Transport
MCP-Inspector-Unterstützung
Claude-Desktop-Integration
Architektur
Die aktuelle Architektur ist:
┌──────────────────────┐
│ Claude Desktop │
│ │
│ User Interaction │
└──────────┬───────────┘
│
│ MCP / stdio
▼
┌──────────────────────┐
│ Leave Manager MCP │
│ Server │
│ │
│ MCP Tool Layer │
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ Leave Service │
│ / Repository │
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ Dummy DB │
│ │
│ employees[] │
│ leaveBalances[] │
│ leaveRequests[] │
└──────────────────────┘Der Server verwendet stdio, da Claude Desktop den MCP-Server als lokalen Prozess starten und über Standardeingabe/-ausgabe mit ihm kommunizieren kann. Das MCP-TypeScript-SDK bietet serveStdio() für diesen Anwendungsfall.
Technologie-Stack
Technologie | Zweck |
TypeScript | Anwendungsentwicklung |
Node.js | Laufzeitumgebung |
npm | Abhängigkeitsverwaltung |
MCP TypeScript SDK | MCP-Server-Implementierung |
Zod | Eingabevalidierung |
Claude Desktop | MCP-Client |
MCP Inspector | Lokales MCP-Testen |
Dummy-DB | Temporäre Datenspeicherung |
Das aktuelle MCP-TypeScript-SDK v2 ist die stabile SDK-Linie und verwendet @modelcontextprotocol/server.
Voraussetzungen
Stellen Sie vor dem Start sicher, dass Folgendes installiert ist.
Related MCP server: Enterprise Data MCP Server
Node.js
Node.js 20 oder höher ist erforderlich.
Überprüfen Sie die installierte Version:
node --versionBeispiel:
v22.9.0npm überprüfen:
npm --versionClaude Desktop
Installieren Sie Claude Desktop auf Ihrem Rechner.
Claude Desktop fungiert als MCP-Client und startet den Leave Manager MCP-Server lokal.
Installation
1. Repository klonen
git clone <YOUR_REPOSITORY_URL>Navigieren Sie in das Projekt:
cd leave-manager-mcp2. Abhängigkeiten installieren
Ausführen:
npm installDas Projekt verwendet das MCP-TypeScript-Serverpaket:
npm install @modelcontextprotocol/serverZod wird zur Validierung der Tool-Eingaben verwendet:
npm install zodFür die TypeScript-Entwicklung:
npm install -D typescript tsx @types/nodeDas offizielle MCP-Server-Setup verwendet derzeit Node.js 20+, ES-Module, @modelcontextprotocol/server, Zod und tsx.
Projektstruktur
Empfohlene Projektstruktur:
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.mdZuständigkeiten
src/index.ts
Erstellt und startet den MCP-Server.
src/models/leave.ts
Enthält TypeScript-Modelle/Schnittstellen für Mitarbeiter und Urlaub.
src/data/dummy-db.ts
Enthält temporäre In-Memory-Testdaten.
src/repositories/leave-repository.ts
Stellt Datenzugriffsoperationen bereit.
src/tools/leave-tools.ts
Registriert MCP-Tools, die Claude aufrufen kann.
Konfiguration
package.json
Eine typische Konfiguration:
{
"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"
}
}Die Abhängigkeitsversionen können je nach Zeitpunkt der Ausführung von
npm installvariieren. Bevorzugen Sie immer die von npm generierten Versionen.
TypeScript-Konfiguration
Erstellen Sie tsconfig.json:
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"types": ["node"],
"outDir": "dist"
},
"include": [
"src/**/*.ts"
]
}Der Node-Types-Eintrag ist bei aktuellen TypeScript-Versionen wichtig, da die veröffentlichten Typdefinitionen des MCP-SDKs auf Node-APIs verweisen.
Verfügbare MCP-Tools
Der aktuelle Leave Manager MCP-Server stellt die folgenden Tools bereit.
1. get_leave_balance
Gibt den aktuellen Urlaubssaldo eines Mitarbeiters zurück.
Eingabe
{
"employeeId": "EMP001"
}Beispielergebnis
{
"employeeId": "EMP001",
"casual": 8,
"sick": 5,
"earned": 12,
"unpaid": 0
}2. get_leave_history
Gibt den Urlaubsverlauf eines Mitarbeiters zurück.
Eingabe
{
"employeeId": "EMP001"
}Beispielergebnis
[
{
"id": "LR001",
"employeeId": "EMP001",
"leaveType": "CASUAL",
"startDate": "2026-08-20",
"endDate": "2026-08-21",
"reason": "Personal work",
"status": "APPROVED"
}
]3. get_leave_types
Gibt verfügbare Urlaubsarten zurück.
Beispielergebnis
[
{
"type": "CASUAL",
"description": "Casual leave"
},
{
"type": "SICK",
"description": "Sick leave"
},
{
"type": "EARNED",
"description": "Earned leave"
},
{
"type": "UNPAID",
"description": "Unpaid leave"
}
]4. apply_leave
Erstellt einen neuen Urlaubsantrag.
Eingabe
{
"employeeId": "EMP001",
"leaveType": "CASUAL",
"startDate": "2026-09-10",
"endDate": "2026-09-11",
"reason": "Family function"
}Beispielergebnis
{
"id": "LR002",
"employeeId": "EMP001",
"leaveType": "CASUAL",
"startDate": "2026-09-10",
"endDate": "2026-09-11",
"reason": "Family function",
"status": "PENDING"
}5. cancel_leave
Storniert einen bestehenden Urlaubsantrag.
Eingabe
{
"leaveId": "LR002"
}Beispielergebnis
{
"id": "LR002",
"status": "CANCELLED"
}MCP-Server ausführen
Es gibt zwei Möglichkeiten, den Server während der Entwicklung auszuführen.
Option 1: Direkt mit tsx ausführen
Dies wird während der Entwicklung empfohlen.
npm run devIntern wird Folgendes ausgeführt:
tsx src/index.tsSie sollten Folgendes sehen:
Leave Manager MCP server running...Der Prozess läuft weiter, da ein stdio-MCP-Server auf einen Client wartet, der mit ihm kommuniziert.
Stoppen Sie den Server mit:
Ctrl + CProjekt erstellen
Bevor Sie die kompilierte Version verwenden, führen Sie Folgendes aus:
npm run buildDies führt aus:
tscDie kompilierten JavaScript-Dateien werden in folgendem Verzeichnis generiert:
dist/Erwartete Struktur:
dist/
├── index.js
├── data/
│ └── dummy-db.js
├── models/
│ └── leave.js
├── repositories/
│ └── leave-repository.js
└── tools/
└── leave-tools.jsProduktions-Build ausführen
Nach dem Erstellen:
npm startDies führt aus:
node dist/index.jsDer MCP-Server startet mit dem kompilierten JavaScript.
Mit MCP Inspector testen
Bevor Sie den Server mit Claude Desktop verbinden, wird empfohlen, ihn mit dem MCP Inspector zu testen.
Der MCP Inspector bietet eine lokale Benutzeroberfläche zum Verbinden mit einem MCP-Server und zum direkten Aufrufen seiner Tools.
Inspector starten
Vom Projektstammverzeichnis aus:
npx @modelcontextprotocol/inspector npm run devAlternativ:
npx @modelcontextprotocol/inspector npx tsx src/index.tsDer Inspector stellt eine Browser-URL bereit.
Öffnen Sie diese URL in Ihrem Browser.
Tools im MCP Inspector testen
Nachdem Sie den Server verbunden haben, öffnen Sie den:
ToolsBereich.
Sie sollten Folgendes sehen:
get_leave_balance
get_leave_history
get_leave_types
apply_leave
cancel_leaveget_leave_balance testen
Wählen Sie:
get_leave_balanceGeben Sie an:
{
"employeeId": "EMP001"
}Erwartete Antwort:
{
"employeeId": "EMP001",
"casual": 8,
"sick": 5,
"earned": 12,
"unpaid": 0
}get_leave_history testen
Eingabe:
{
"employeeId": "EMP001"
}get_leave_types testen
Dieses Tool erfordert keine Eingabe.
apply_leave testen
Eingabe:
{
"employeeId": "EMP001",
"leaveType": "CASUAL",
"startDate": "2026-09-10",
"endDate": "2026-09-11",
"reason": "Family function"
}cancel_leave testen
Eingabe:
{
"leaveId": "LR002"
}Mit Claude Desktop verbinden
Sobald der Server im MCP Inspector korrekt funktioniert, verbinden Sie ihn mit Claude Desktop.
Der MCP-Server sollte als lokaler stdio-Server konfiguriert werden, da Claude Desktop den Prozess startet und über stdin/stdout kommuniziert.
1. Projekt erstellen
Führen Sie zuerst aus:
npm run buildStellen Sie sicher, dass diese Datei existiert:
dist/index.js2. Absoluten Projektpfad ermitteln
Vom Projektstammverzeichnis aus:
pwdBeispiel:
/Users/ashish/projects/leave-manager-mcpIhr Serverpfad lautet daher:
/Users/ashish/projects/leave-manager-mcp/dist/index.jsVerwenden Sie einen absoluten Pfad in der Claude-Desktop-Konfiguration.
Claude-Desktop-Konfiguration
Fügen Sie den Leave Manager MCP-Server zur MCP-Konfiguration von Claude Desktop hinzu.
Beispiel:
{
"mcpServers": {
"leave-manager": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/leave-manager-mcp/dist/index.js"
]
}
}
}Zum Beispiel unter macOS:
{
"mcpServers": {
"leave-manager": {
"command": "node",
"args": [
"/Users/ashish/projects/leave-manager-mcp/dist/index.js"
]
}
}
}Ersetzen Sie den Pfad durch den tatsächlichen absoluten Pfad auf Ihrem Rechner.
Wichtig: Claude Desktop neu starten
Nachdem Sie die MCP-Konfiguration geändert haben:
Speichern Sie die Konfiguration.
Beenden Sie Claude Desktop vollständig.
Starten Sie Claude Desktop erneut.
Öffnen Sie eine neue Konversation.
Überprüfen Sie die verfügbaren MCP-Tools.
Sie sollten den Leave Manager-Server und seine Tools sehen.
Leave Manager mit Claude testen
Nach der Verbindung müssen Sie die MCP-Tools nicht manuell aufrufen.
Sie können Claude einfach Fragen in natürlicher Sprache stellen.
Beispiel 1 – Urlaubssaldo
Fragen Sie:
How many leaves does EMP001 have?Claude sollte verwenden:
get_leave_balancemit:
{
"employeeId": "EMP001"
}Beispiel 2 – Urlaubsverlauf
Fragen Sie:
Show me the leave history of EMP001.Claude sollte verwenden:
get_leave_historyBeispiel 3 – Verfügbare Urlaubsarten
Fragen Sie:
What types of leaves are available?Claude sollte verwenden:
get_leave_typesBeispiel 4 – Urlaub beantragen
Fragen Sie:
Apply casual leave for EMP001 from September 10 to September 11 because of a family function.Claude sollte verwenden:
apply_leavemit den entsprechenden Parametern.
Beispiel 5 – Urlaub stornieren
Fragen Sie:
Cancel leave request LR002.Claude sollte verwenden:
cancel_leaveDummy-Datenbank
Die aktuelle Implementierung verwendet eine In-Memory-Datenbank.
Beispiel:
export const employees = [
{
id: "EMP001",
name: "Ashish Kushwaha",
email: "ashish@example.com",
department: "Engineering"
}
];Urlaubssaldo:
export const leaveBalances = [
{
employeeId: "EMP001",
casual: 8,
sick: 5,
earned: 12,
unpaid: 0
}
];Urlaubsanträge:
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"
}
];Wichtige Einschränkung der Dummy-Datenbank
Die aktuelle Datenbank wird im Anwendungsspeicher gespeichert.
Daher:
Server starts
↓
Dummy data loaded
↓
Apply leave
↓
New request added
↓
Server stops
↓
Data is lostDies ist erwartungsgemäß so.
Die Dummy-Datenbank ist nur für die Entwicklung und das MCP-Testen gedacht.
Entwicklungsworkflow
Empfohlener Entwicklungsworkflow:
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 changesWährend der Entwicklung können Sie auch verwenden:
npm run devanstatt nach jeder Änderung neu zu erstellen.
Protokollierung
Da der Server stdio verwendet, verwenden Sie console.log() nicht für die normale Serverprotokollierung.
Vermeiden Sie:
console.log("Server started");Verwenden Sie:
console.error("Server started");Der Grund ist, dass stdout von MCP für die Protokollkommunikation verwendet wird. Das Schreiben normaler Protokolle nach stdout kann den JSON-RPC/MCP-Kommunikationsstream beschädigen.
Fehlerbehebung
Problem: Cannot find module
Führen Sie aus:
rm -rf node_modules
rm -f package-lock.json
npm installDann:
npm run buildProblem: TypeScript-Build-Fehler
Führen Sie aus:
npx tsc --noEmitDies zeigt TypeScript-Fehler an, ohne Dateien zu generieren.
Problem: dist/index.js existiert nicht
Führen Sie aus:
npm run buildÜberprüfen Sie dann:
ls distProblem: Claude Desktop zeigt den MCP-Server nicht an
Überprüfen Sie:
Die MCP-Konfiguration ist gültiges JSON.
Der Pfad zu
dist/index.jsist absolut.npm run buildwurde erfolgreich abgeschlossen.dist/index.jsexistiert.Node.js ist installiert.
Claude Desktop wurde vollständig neu gestartet.
Der MCP-Server funktioniert im MCP Inspector.
Problem: MCP Inspector kann keine Verbindung herstellen
Führen Sie zuerst aus:
npm run devWenn der Server erfolgreich startet, stoppen Sie ihn und führen Sie dann aus:
npx @modelcontextprotocol/inspector npm run devÜberprüfen Sie das Terminal auf Fehler.
Problem: Server startet, aber Tools sind nicht sichtbar
Überprüfen Sie:
src/index.tsund stellen Sie sicher, dass Ihre Tools registriert sind:
registerLeaveTools(
server,
repository
);Stellen Sie außerdem sicher, dass serveStdio() aufgerufen wird:
void serveStdio(createServer);Problem: JSON-RPC/MCP-Protokollfehler
Überprüfen Sie den Code auf:
console.log(...)Ersetzen Sie die normale Protokollierung durch:
console.error(...)stdout muss für die MCP-Protokollkommunikation verfügbar bleiben.
Zukünftige Erweiterungen
Die aktuelle Version ist ein Prototyp. Die folgenden Verbesserungen werden empfohlen.
Datenbank
Ersetzen Sie die Dummy-Datenbank durch:
PostgreSQL
MySQL
MongoDBoder eine bestehende interne Leave-Management-API.
Authentifizierung
Fügen Sie eine Mitarbeiterauthentifizierung hinzu, damit der Benutzer nicht angeben muss:
employeeIdmanuell.
Zukünftige Architektur:
Claude
↓
MCP Server
↓
Authentication
↓
Employee Context
↓
Leave ServiceUrlaubsvalidierung
Fügen Sie Geschäftsregeln hinzu:
Urlaubsdaten validieren
Urlaubssaldo validieren
Überlappende Urlaube verhindern
Firmenfeiertage prüfen
Wochenenden prüfen
Mindest-/Höchstdauer des Urlaubs validieren
Mitarbeiterstatus validieren
Urlaubsart validieren
Stornierung nach Genehmigung verhindern, falls zutreffend
Manager-Genehmigung
Fügen Sie Tools hinzu wie:
get_pending_leave_requests
approve_leave
reject_leaveTeamkalender
Fügen Sie hinzu:
get_team_leave_calendarBeispiel für eine Benutzeranfrage:
Who from my team is on leave next week?Benachrichtigungen
Integrieren Sie:
Email
Slack
Microsoft Teamsum Mitarbeiter und Manager zu benachrichtigen.
Empfohlene Produktionsarchitektur
Die langfristige Architektur sollte MCP von der Geschäftslogik trennen:
Claude Desktop
│
│ MCP
▼
┌───────────────────┐
│ MCP Server │
│ │
│ Tool Definitions │
│ Input Validation │
└─────────┬─────────┘
│
▼
┌───────────────────┐
│ Leave Service │
│ │
│ Business Rules │
│ Validation │
│ Authorization │
└─────────┬─────────┘
│
▼
┌───────────────────┐
│ Leave Repository │
└─────────┬─────────┘
│
┌────────┴────────┐
▼ ▼
Internal Leave API DatabaseDies ermöglicht es, die Dummy-Datenbank zu ersetzen, ohne die Tools zu ändern, die Claude ausgesetzt sind.
Sicherheitsüberlegungen
Das aktuelle Projekt ist nur für Entwicklung/Testen gedacht.
Bevor Sie es mit echten Mitarbeiterdaten verwenden:
Authentifizierung hinzufügen.
Autorisierung hinzufügen.
Der vom Modell gelieferten
employeeIdnicht vertrauen.Alle Tool-Eingaben validieren.
Mitarbeiterinformationen schützen.
Keine unnötigen Mitarbeiterdaten offenlegen.
Audit-Logging hinzufügen.
Rollenbasierte Zugriffskontrolle implementieren.
Nur für Manager vorgesehene Vorgänge rützen.
Ratenbegrenzung hinzufügen, wo anwendbar.
Keine Geheimnisse im Quellcode speichern.
Umgebungsvariablen für Zugangsdaten verwenden.
Verbindungen zu internen APIs/Datenbanken äsichern.
Der MCP-Server sollte Geschäftsberechtigungen durchsetzen, anstatt Claude Sicherheitsentscheidungen treffen zu lassen.
Umgebungsvariablen
Wenn Sie sich mit echten Diensten verbinden, verwenden Sie Umgebungsvariablen.
Beispiel .env:
LEAVE_API_URL=https://internal.example.com/api
LEAVE_API_KEY=your-api-keyCommitten Sie .env nicht in Git.
Fügen Sie hinzu:
.envzu .gitignore.
Git Ignore
Empfohlene .gitignore:
node_modules/
dist/
.env
.DS_Store
*.logNützliche Befehle
Abhängigkeiten installieren
npm installEntwicklung
npm run devBuild
npm run buildKompilierten Server ausführen
npm startTypprüfung
npx tsc --noEmitMCP Inspector ausführen
npx @modelcontextprotocol/inspector npm run devNode-Version prüfen
node --versionnpm-Version prüfen
npm --versionMCP-Entwicklungscheckliste
Bevor Sie den MCP-Server als bereit für interne Tests betrachten:
Node.js 20+ installiert
Abhängigkeiten installiert
TypeScript-Build erfolgreich
Dummy-Datenbank konfiguriert
MCP-Server startet erfolgreich
MCP Inspector verbindet erfolgreich
get_leave_balancegetestetget_leave_historygetestetget_leave_typesgetestetapply_leavegetestetcancel_leavegetestetKonfiguration für Claude Desktop hinzugefügt
Claude Desktop neu gestartet
Leave Manager-MCP-Tools in Claude sichtbar
Anfragen in natürlicher Sprache getestet
Fehlerszenarien getestet
Beispielhafte Benutzeranfragen
Sobald Claude Desktop verbunden ist, sollten Benutzer Fragen stellen können wie:
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.Zukünftige Beispiele:
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-Ressourcen
Offizielles MCP TypeScript SDK:
https://ts.sdk.modelcontextprotocol.io/v2/
Offizieller Leitfaden für den ersten Server:
https://ts.sdk.modelcontextprotocol.io/v2/get-started/first-server
Offizielle Server-API:
https://ts.sdk.modelcontextprotocol.io/v2/api/@modelcontextprotocol/server/
Das Projekt folgt derzeit der Architektur des MCP TypeScript SDK v2 und dem modernen Protokoll vom 2026-07-28.
Lizenz
Dieses Projekt ist für die interne Entwicklung und für Tests gedacht.
Fügen Sie hier die Lizenz und die Nutzungsrichtlinie Ihrer Organisation hinzu.
Betreuer
Ashish Kushwaha
Leave Manager MCP Server TypeScript + MCP + Claude Desktop
# Schnellstart
Für erfahrene Entwickler kann die voll-audio Einrichtung als folgt zusammengefasst werden:
# 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 devKonfigurieren Sie Claude Desktop dann für den Start:
dist/index.jsmit:
{
"mcpServers": {
"leave-manager": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/leave-manager-mcp/dist/index.js"
]
}
}
}Starten Sie Claude Desktop neu und testen Sie die MCP-Tools von 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.-