Skip to main content
Glama
xytangme

NeoDB MCP Server

Official
by xytangme

get-user-info

Retrieve basic user information from NeoDB, a social book cataloging service, using this API tool for accessing profile details.

Instructions

Get current user's basic info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler implementation for the 'get-user-info' tool. Fetches user data from the NeoDB API endpoint '/api/me' using the provided access token, handles errors, and formats the user information (username, display name, email, URL, created_at) into a text response.
    if name == "get-user-info": """ https://neodb.social/developer/#/user/users_api_me """ async with httpx.AsyncClient() as client: user_data, status_code = await make_neodb_request( client, access_token, '/api/me', api_base ) if status_code != 200: error_message = { 401: "Unauthorized", }.get(status_code, f"Request failed with status code: {status_code}") return [types.TextContent(type="text", text=error_message)] if not user_data: return [types.TextContent(type="text", text="Failed to retrieve user information")] # Format user information user_text = ( f"User Information:\n" f"Username: {user_data.get('username', 'Unknown')}\n" f"Display Name: {user_data.get('display_name', 'Unknown')}\n" f"Email: {user_data.get('email', 'Not provided')}\n" f"URL: {user_data.get('url', 'Not provided')}\n" f"Account Created: {user_data.get('created_at', 'Unknown')}\n" ) return [ types.TextContent( type="text", text=user_text ) ]
  • Registration of the 'get-user-info' tool in the list_tools handler, including name, description, and empty input schema (no parameters required).
    types.Tool( name="get-user-info", description="Get current user's basic info", inputSchema={ "type": "object", "properties": {}, # No parameters needed "required": [], }, ),
  • JSON schema definition for the 'get-user-info' tool input: an empty object with no properties or required fields.
    types.Tool( name="get-user-info", description="Get current user's basic info", inputSchema={ "type": "object", "properties": {}, # No parameters needed "required": [], }, ),

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/xytangme/neodb-mcp'

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