search_users
Locate users in the Devici MCP Server by specifying a field and search text, enabling efficient user management and threat modeling resource organization.
Instructions
Search users by field and text
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| field | Yes | ||
| text | Yes |
Implementation Reference
- src/devici_mcp_server/server.py:35-40 (handler)The MCP tool handler for 'search_users', registered via @mcp.tool() decorator. It uses a context-managed API client to call the underlying search_users method and returns the result as a string.@mcp.tool() async def search_users(field: str, text: str) -> str: """Search users by field and text""" async with create_client_from_env() as client: result = await client.search_users(field, text) return str(result)
- Supporting method in DeviciAPIClient class that executes the HTTP GET request to the Devici API endpoint for searching users by specified field and text.async def search_users(self, field: str, text: str) -> Dict[str, Any]: """Search users by field and text.""" return await self._make_request("GET", f"/users/search/field={field}&text={text}")