Skip to main content
Glama
franccesco

Bloomy MCP

by franccesco

execute_query

Execute GraphQL queries or mutations with variables on the Bloomy MCP server. Parses and runs operations, returning results or error messages for data interactions with the Bloom Growth platform.

Instructions

Execute a GraphQL query or mutation with variables.

Parses and executes the provided GraphQL operation string with optional variables.

Args:
    query: Raw GraphQL query or mutation string
    variables: Optional dictionary of variables to use in the operation

Returns:
    Dictionary containing the operation results or an error message string

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
variablesNo

Implementation Reference

  • The main handler function for the 'execute_query' tool. It parses the GraphQL query string using gql, executes it against default_client with optional variables, and returns the result or an error message.
    def execute_query(query: str, variables: Optional[Dict[str, Any]] = None) -> Union[Dict[str, Any], str]:
        """Execute a GraphQL query or mutation with variables.
    
        Parses and executes the provided GraphQL operation string with optional variables.
    
        Args:
            query: Raw GraphQL query or mutation string
            variables: Optional dictionary of variables to use in the operation
    
        Returns:
            Dictionary containing the operation results or an error message string
    
        Raises:
            Exception: Handled internally, returns error message as string
        """
        try:
            parsed_query = gql(query)
            result = default_client.execute(parsed_query, variable_values=variables)
            return result
        except Exception as e:
            return f"Error executing query: {str(e)}"
  • Registration of the 'execute_query' tool using the FastMCP mcp.tool() decorator.
    mcp.tool()(execute_query)
  • Import of the execute_query function in server.py for registration.
    execute_query,
  • Re-export of execute_query in __init__.py __all__ list.
    "execute_query",
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool 'parses and executes' operations, handles errors internally by returning error messages as strings, and returns results as a dictionary. However, it lacks details on permissions, rate limits, side effects (e.g., mutations vs. queries), or performance characteristics, which are important for a tool executing arbitrary GraphQL.

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 appropriately sized and front-loaded, with the core purpose stated first, followed by parameter and return details in a structured format (Args, Returns, Raises). Every sentence adds value, but the 'Raises' section could be more concise, as it somewhat repeats error handling mentioned earlier.

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

Completeness3/5

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

Given the tool's complexity (executing arbitrary GraphQL with potential mutations), no annotations, no output schema, and 2 parameters with 0% schema coverage, the description is moderately complete. It covers basic operation and error handling but lacks details on security implications, mutation effects, or response structure, which are crucial for safe and effective use.

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 description adds significant meaning beyond the input schema, which has 0% description coverage. It explains that 'query' is a 'Raw GraphQL query or mutation string' and 'variables' is an 'Optional dictionary of variables to use in the operation,' clarifying their roles and formats. This compensates well for the schema's lack of descriptions, though it doesn't provide examples or constraints.

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 tool's purpose: 'Execute a GraphQL query or mutation with variables.' It specifies the verb ('execute') and resource ('GraphQL query or mutation'), and distinguishes it from siblings like get_query_details (which likely inspects rather than executes). However, it doesn't explicitly differentiate from get_mutation_details, which might be a sibling for mutation-specific details.

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 by mentioning 'GraphQL query or mutation' and providing parameter details, but it doesn't explicitly state when to use this tool versus alternatives like get_query_details or get_mutation_details. No guidance on prerequisites, error handling scenarios, or specific contexts for use is provided.

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