Skip to main content
Glama
OpenLinkSoftware

mcp-sqlalchemy

podbc_sparql_func

Query and process SPARQL-based data directly through SQLAlchemy connectivity, enabling integration with any DBMS accessible via SQLAlchemy.

Instructions

Call ???.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNo
promptYes
urlNo

Implementation Reference

  • The main handler function `podbc_sparql_func` that connects to the database using pyodbc, executes the SQL command `select DEMO.DBA.OAI_SPARQL_FUNC(?, ?) as result` with the prompt and API key, and returns the result.
    def podbc_sparql_func(prompt: str, api_key:Optional[str]=None, user:Optional[str]=None, 
                        password:Optional[str]=None, dsn:Optional[str]=None) -> str:
        """
        Call SPARQL AI func.
    
        Args:
            prompt (str): The prompt.
            api_key (str): optional.
            user (Optional[str]=None): Optional username.
            password (Optional[str]=None): Optional password.
            dsn (Optional[str]=None): Optional dsn name.
    
        Returns:
            str: Results data in JSON.
        """
        try:
            _api_key = api_key if api_key is not None else API_KEY
            with get_connection(True, user, password, dsn) as conn:
                cursor = conn.cursor()
                cmd = f"select DEMO.DBA.OAI_SPARQL_FUNC(?, ?) as result"
                rs = cursor.execute(cmd, (prompt, _api_key,)).fetchone()
                return rs[0]
        except pyodbc.Error as e:
            logging.error(f"Error executing request")
            raise pyodbc.Error("Error executing request")
  • The `@mcp.tool` decorator registers the `podbc_sparql_func` tool, specifying its name and description.
    @mcp.tool(
        name="podbc_sparql_func",
        description="Tool to use the SPARQL AI support function"
    )
  • The tool function is included in the package's `__all__` list for easy import.
    "podbc_sparql_func",
  • The `podbc_sparql_func` function is imported from server.py in the package init for re-export.
    podbc_sparql_func,
Behavior1/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but provides none. 'Call ???.' gives no indication of whether this is a read/write operation, what permissions might be required, what side effects exist, or how results are returned. This is completely inadequate for a tool with 3 parameters.

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

Conciseness2/5

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

While technically concise with just two words, this represents under-specification rather than effective brevity. The description is too minimal to be useful, and the placeholder '???' suggests it's incomplete rather than intentionally concise.

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

Completeness1/5

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

For a tool with 3 parameters, no annotations, no output schema, and 0% schema description coverage, the description is completely inadequate. It provides no information about purpose, behavior, parameters, or usage context, making it impossible for an agent to understand how to use this tool effectively.

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

Parameters1/5

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

Schema description coverage is 0%, meaning none of the 3 parameters (api_key, prompt, url) have descriptions in the schema. The tool description provides absolutely no information about parameter meanings, formats, or usage, failing completely to compensate for the schema's deficiencies.

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

Purpose1/5

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

The description 'Call ???.' is tautological (restates the name 'podbc_sparql_func' without adding meaningful content) and provides no information about what the tool actually does. It doesn't specify what resource or operation is involved, making it completely unhelpful for understanding the tool's purpose.

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

Usage Guidelines1/5

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

No guidance is provided about when to use this tool versus the 9 sibling tools on the server. The description offers no context about appropriate use cases, prerequisites, or alternatives, leaving the agent with no basis for selection among similar database/query tools.

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/OpenLinkSoftware/mcp-sqlalchemy-server'

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