Skip to main content
Glama

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",

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