Skip to main content
Glama

get_user

Retrieve detailed user information by specifying a user ID using the MCP Server’s API integration with SD Elements security platform.

Instructions

Get detailed information about a specific user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idYesThe ID of the user to retrieve

Implementation Reference

  • The primary handler function for the 'get_user' tool. It initializes the API client if necessary, calls api_client.get_user(user_id), and returns the result as formatted JSON. The @mcp.tool() decorator handles registration and schema inference from signature and docstring.
    @mcp.tool() async def get_user(ctx: Context, user_id: int) -> str: """Get details of a specific user""" global api_client if api_client is None: api_client = init_api_client() result = api_client.get_user(user_id) return json.dumps(result, indent=2)
  • Import statement in tools/__init__.py that loads the users module, executing the @mcp.tool() decorators to register the get_user tool.
    from .users import *
  • Import in server.py that loads the tools package, transitively importing users.py and completing tool registration before running the MCP server.
    from . import tools # noqa: F401

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/geoffwhittington/sde-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server