Skip to main content
Glama
OpenLinkSoftware

mcp-sqlalchemy

podbc_virtuoso_support_ai

Leverage AI support in Virtuoso via MCP’s SQLAlchemy integration to process prompts and enhance database interactions.

Instructions

Tool to use the Virtuoso AI support function

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNo
promptYes
urlNo

Implementation Reference

  • The handler function decorated with @mcp.tool, which registers and implements the 'podbc_virtuoso_support_ai' tool. It connects to the database via pyodbc, executes the Virtuoso AI support SQL function with the prompt and API key, and returns the result.
    @mcp.tool(
        name="podbc_virtuoso_support_ai",
        description="Tool to use the Virtuoso AI support function"
    )
    def podbc_virtuoso_support_ai(prompt: str, api_key:Optional[str]=None, user:Optional[str]=None, 
                                password:Optional[str]=None, dsn:Optional[str]=None) -> str:
        """
        Tool to use the Virtuoso AI support function
    
        Args:
            prompt (str): AI prompt text (required).
            api_key (str): API key for AI service (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_VIRTUOSO_SUPPORT_AI(?, ?) 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 tool with name 'podbc_virtuoso_support_ai' and its description.
    @mcp.tool(
        name="podbc_virtuoso_support_ai",
        description="Tool to use the Virtuoso AI support function"
    )
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 offers almost none. It doesn't indicate whether this is a read or write operation, what kind of AI support is provided, what the typical response format is, or any limitations. The description is too vague to help an agent understand what behavior to expect when invoking this tool.

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 (one sentence), this is under-specification rather than effective conciseness. The single sentence 'Tool to use the Virtuoso AI support function' doesn't provide enough information to be useful. Good conciseness balances brevity with completeness - this leans too far toward brevity at the expense of utility.

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?

Given 3 parameters with 0% schema coverage, no annotations, no output schema, and a complex-sounding 'AI support function', the description is completely inadequate. It doesn't explain what the tool does, how to use it, what inputs it expects, or what outputs to anticipate. For a tool that appears to involve AI interaction with a database system, this level of documentation is insufficient.

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?

With 0% schema description coverage and 3 parameters (api_key, prompt, url), the description provides no information about any parameters. It doesn't explain what the 'prompt' parameter should contain, what the 'api_key' is for, or what 'url' refers to. The description fails to compensate for the complete lack of parameter documentation in the schema.

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

Purpose2/5

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

The description 'Tool to use the Virtuoso AI support function' is tautological - it essentially restates the tool name 'podbc_virtuoso_support_ai' with minimal elaboration. While it mentions 'AI support function', it doesn't specify what this function actually does (e.g., answer questions, generate code, troubleshoot). It doesn't distinguish itself from sibling tools like podbc_execute_query or podbc_sparql_query.

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?

The description provides no guidance on when to use this tool versus alternatives. Given the sibling tools include various database query and schema exploration tools, there's no indication whether this AI support function is for natural language queries, debugging assistance, or something else. No context about appropriate use cases or prerequisites 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/OpenLinkSoftware/mcp-sqlalchemy-server'

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