search_users
Find users in the Devici security platform by searching specific fields with text queries to manage access and permissions.
Instructions
Search users by field and text
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| field | Yes | ||
| text | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/devici_mcp_server/server.py:35-40 (handler)The main MCP tool handler for 'search_users'. It is registered via @mcp.tool() decorator and proxies the call to the Devici API client, returning the result as 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 API client method that makes the HTTP request to the Devici API endpoint for searching users.
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}") - src/devici_mcp_server/server.py:35-35 (registration)The @mcp.tool() decorator registers the search_users function as an MCP tool with the FastMCP server instance.
@mcp.tool()