Skip to main content
Glama
shazaaly

MCP Boilerplate Server

by shazaaly

get_user_info

Retrieve user details by providing a user ID. Designed for managing user information within the MCP Boilerplate Server environment.

Instructions

Get user information by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idYes

Implementation Reference

  • The handler function for the 'get_user_info' tool, decorated with @mcp.tool for registration. It takes a user_id and returns mock user information or an error message if the user is not found.
    @mcp.tool def get_user_info(user_id: int) -> dict: """Get user information by ID""" mock_users = { 1: {"name": "Alice", "email": "alice@example.com", "role": "admin"}, 2: {"name": "Bob", "email": "bob@example.com", "role": "user"}, 3: {"name": "Charlie", "email": "charlie@example.com", "role": "user"} } return mock_users.get(user_id, {"error": "User not found"})

Other Tools

Related Tools

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/shazaaly/mcp-boilerplate'

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