MCP Service: Tools Definition¶
This document defines the formal contract of the tools exposed by the mcp_service via the Model Context Protocol. The ai_service agent will consume these tools to perform actions.
1. Tool: manageUserGroup¶
- Description: Manages user membership in groups by adding or removing them.
- Input Schema:
{ "type": "object", "properties": { "action": { "type": "string", "enum": ["ADD", "REMOVE"] }, "userId": { "type": "string", "description": "The ID of the user to modify." }, "groupName": { "type": "string", "description": "The name of the group." } }, "required": ["action", "userId", "groupName"] } - Output Schema:
{ "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" } } }
2. Tool: queryUsers¶
- Description: Searches for users based on defined criteria.
- Input Schema:
{ "type": "object", "properties": { "email": { "type": "string", "description": "The email of the user to find." } }, "required": ["email"] } - Output Schema:
{ "type": "object", "properties": { "users": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "email": { "type": "string" }, "status": { "type": "string" } } } } } }
3. Tool: searchKnowledgeBase¶
- Description: Performs a search against the project's documentation (
/docsrepository). - Input Schema:
{ "type": "object", "properties": { "query": { "type": "string", "description": "The search query." } }, "required": ["query"] } - Output Schema:
{ "type": "object", "properties": { "results": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string" }, "url": { "type": "string" }, "snippet": { "type": "string" } } } } } }
4. Tool: queryAuditTrail¶
- Description: Retrieves logs from the security audit trail for a specific user.
- Input Schema:
{ "type": "object", "properties": { "userId": { "type": "string", "description": "The ID of the user to query logs for." }, "limit": { "type": "number", "description": "The maximum number of logs to return.", "default": 25 } }, "required": ["userId"] } - Output Schema:
{ "type": "object", "properties": { "logs": { "type": "array", "items": { "type": "object", "properties": { "timestamp": { "type": "string" }, "action": { "type": "string" }, "details": { "type": "string" } } } } } }