Skip to main content
Glama
xytangme

NeoDB MCP Server

Official
by xytangme

get-user-info

Retrieve basic user information from NeoDB's social book cataloging service to access account details and personalize your reading experience.

Instructions

Get current user's basic info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of all tools via @server.list_tools(), specifically including the get-user-info tool with its schema.
    @server.list_tools()
    async def handle_list_tools() -> list[types.Tool]:
        """
        List available tools.
        Each tool specifies its arguments using JSON Schema validation.
        """
        return [
            types.Tool(
                name="get-user-info",
                description="Get current user's basic info",
                inputSchema={
                    "type": "object",
                    "properties": {},  # No parameters needed
                    "required": [],
                },
            ),
            types.Tool(
                name="search-books",
                description="Search items in catalog",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "query": {
                            "type": "string",
                            "description": "Search query for books",
                        }
                    },
                    "required": ["query"],
                },
            ),
            types.Tool(
                name="get-book",
                description="Get detailed information about a specific book",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "book_id": {
                            "type": "string",
                            "description": "The ID of the book to retrieve",
                        },
                    },
                    "required": ["book_id"],
                },
            ),
        ]
  • Schema definition for get-user-info tool: no input parameters required.
    types.Tool(
        name="get-user-info",
        description="Get current user's basic info",
        inputSchema={
            "type": "object",
            "properties": {},  # No parameters needed
            "required": [],
        },
    ),
  • Implementation of the get-user-info tool handler: calls NeoDB /api/me endpoint using access token, handles errors, and returns formatted user information.
    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
                )
            ]
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. It mentions 'Get' which implies a read operation, but doesn't specify authentication needs, rate limits, error conditions, or what 'basic info' includes. This leaves significant gaps for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any redundant or unnecessary words. It is front-loaded and appropriately sized for a simple tool with no parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete. It doesn't explain what 'basic info' entails or the return format, which is crucial for an agent to understand the tool's behavior. For a tool with such sparse structured data, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter information is needed. The description appropriately doesn't discuss parameters, aligning with the schema. A baseline of 4 is applied as it compensates adequately for the lack of parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'current user's basic info', making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'get-book' or 'search-books', which operate on different resources, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives or any context for its application. It simply states what it does without indicating scenarios, prerequisites, or exclusions, leaving usage entirely implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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