Skip to main content
Glama
Dalejan

Volleyball MCP Server

by Dalejan

execute_query

Execute SQL queries to retrieve volleyball match, team, and tournament data from the VolleyballWorld API database.

Instructions

Ejecuta una query SQL en la base de datos de voleibol.

Args:
    query: La query SQL a ejecutar.

Returns:
    Una lista de tuplas con los resultados de la query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Implementation Reference

  • main.py:8-20 (handler)
    The execute_query tool handler, registered via @mcp.tool() decorator. Thin wrapper around run_query helper.
    @mcp.tool()
    def execute_query(query: str, ctx: Context) -> list:
        """
        Ejecuta una query SQL en la base de datos de voleibol.
    
        Args:
            query: La query SQL a ejecutar.
    
        Returns:
            Una lista de tuplas con los resultados de la query.
        """
        rows = run_query(query)
        return rows
  • Core helper function that executes the SQL query safely (SELECT only) using sqlite3 and returns results.
    def run_query(sql: str, params: Tuple[Any, ...] = ()) -> List[Tuple]:
        """Ejecuta una query SELECT y devuelve los resultados.
        
        Args:
            sql: La query SQL a ejecutar.
            params: Los parĂ¡metros para la query.
    
        Returns:
            Una lista de tuplas con los resultados de la query.
        """
        if not sql.strip().lower().startswith("select"):
            raise ValueError("Solo se permiten queries SELECT. Intenta con una query SELECT.")
        
        conn = get_connection()
        try:
            cur = conn.cursor()
            cur.execute(sql, params)
            return cur.fetchall()
        finally:
            conn.close()
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool executes SQL queries and returns results as a list of tuples, which covers basic behavior. However, it fails to disclose critical traits like whether it's read-only or destructive, authentication requirements, error handling, or rate limits. This is a significant gap for a database query tool.

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 concise and well-structured, using clear sections for Args and Returns. Each sentence serves a purpose: stating the tool's function, describing the parameter, and explaining the return value. There is no unnecessary information, making it efficient for an agent to parse.

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 SQL queries) and lack of annotations or output schema, the description is minimally adequate. It covers the basic purpose, parameter, and return format, but misses important contextual details like safety warnings, error conditions, or database-specific constraints. Without an output schema, more detail on return values would be beneficial.

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 meaningful context for the single parameter 'query' by specifying it as 'La query SQL a ejecutar' (The SQL query to execute), which clarifies its purpose beyond the schema's basic type information. Since schema description coverage is 0%, the description compensates adequately, though it could provide more details on query format or restrictions. With only one parameter, the baseline is high.

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: 'Ejecuta una query SQL en la base de datos de voleibol' (Executes an SQL query in the volleyball database). It specifies the verb (execute) and resource (SQL query on volleyball database), making the function unambiguous. However, without sibling tools, there's no opportunity to distinguish from alternatives, preventing a perfect 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. It lacks information about prerequisites, such as required permissions or database connection details, and does not mention any constraints or best practices for SQL queries. This leaves the agent without context for appropriate usage.

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/Dalejan/volleyball_mcp'

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