Skip to main content
Glama
franccesco

Bloomy MCP

by franccesco

get_authenticated_user_id

Retrieve the authenticated user ID using the current API token for Bloom Growth platform operations. Returns the user ID string or an error message if unsuccessful.

Instructions

Get the ID of the currently authenticated user.

Uses a special mutation to retrieve the ID of the user associated with
the current API token.

Returns:
    User ID string if successful, None if user not found, or error message string

Raises:
    Exception: Handled internally, returns error message as string

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function that executes a GraphQL mutation to fetch the ID of the currently authenticated user via the default GraphQL client.
    def get_authenticated_user_id() -> Union[str, None]:
        """Get the ID of the currently authenticated user.
    
        Uses a special mutation to retrieve the ID of the user associated with
        the current API token.
    
        Returns:
            User ID string if successful, None if user not found, or error message string
    
        Raises:
            Exception: Handled internally, returns error message as string
        """
        try:
            query = gql(
                """
            mutation GetAuthenticatedUserId {
                getAuthenticatedUserId
            }
            """
            )
    
            result = default_client.execute(query)
            return result.get("getAuthenticatedUserId")
        except Exception as e:
            return f"Error getting authenticated user ID: {str(e)}"
  • Registers the get_authenticated_user_id handler as an MCP tool using the FastMCP library's tool decorator.
    mcp.tool()(get_authenticated_user_id)
  • Imports the get_authenticated_user_id function from operations.py for use in the MCP server.
    from bloomy_mcp.operations import (
        get_query_details,
        get_mutation_details,
        execute_query,
        get_authenticated_user_id,
    )
    
    
    # Initialize FastMCP server
    dependencies = [
        "gql",
        "httpx",
        "pyyaml",
    ]
    mcp = FastMCP("bloom-graphql", dependencies=dependencies)
    
    
    # Register resources
    mcp.resource("bloom://queries")(get_available_queries)
    mcp.resource("bloom://mutations")(get_available_mutations)
    
    
    # Register tools
    mcp.tool()(get_query_details)
    mcp.tool()(get_mutation_details)
    mcp.tool()(execute_query)
    mcp.tool()(get_authenticated_user_id)
  • Exports the tool in the package __all__ list for easy import.
    "get_authenticated_user_id",
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing behavioral traits: it explains the operation uses a 'special mutation', describes three possible return outcomes (ID string, None, or error message), and mentions exception handling. It doesn't cover rate limits or auth specifics beyond the token reference.

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

Conciseness4/5

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

The description is well-structured with clear sections (purpose, method, returns, raises) and avoids redundancy. It could be slightly more concise by merging some details, but every sentence adds meaningful information.

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

Completeness4/5

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

Given the tool's simplicity (0 parameters, no output schema), the description is quite complete: it explains what the tool does, how it works, possible outcomes, and error handling. For a no-parameter identity tool, this covers essential context without over-explaining.

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?

Since there are 0 parameters and schema coverage is 100%, the baseline is 4. The description appropriately doesn't discuss parameters, focusing instead on the tool's behavior and output, which adds value beyond the empty schema.

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

Purpose5/5

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

The description clearly states the specific action ('Get the ID') and target resource ('currently authenticated user'), distinguishing it from sibling tools like execute_query or get_mutation_details. It provides a precise verb+resource combination without being tautological.

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

Usage Guidelines3/5

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

The description implies usage context by mentioning 'currently authenticated user' and 'API token', suggesting it's for identity verification. However, it lacks explicit guidance on when to use this tool versus alternatives or any prerequisites beyond authentication.

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

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/franccesco/bloomy-mcp'

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