Skip to main content
Glama
Auto Ontology MCP

Auto Ontology MCP

Register a database datasource

add_datasource
Idempotent

Registers a relational database from a SQLAlchemy URL, verifies read-only connectivity, and can scan its schema; use it when the user supplies a URL to connect a new data source.

Instructions

Register a relational database by SQLAlchemy URL, verify read-only connectivity, and optionally scan its schema. Use only when the user supplies a URL; never invent credentials, and use scan_datasource instead to re-read an already registered database. Connections are strictly read-only and never modify the target database. Reusing an existing name updates its URL and saved filter while preserving modeled Terms; fails with the connection or driver error if unreachable.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "url": "<url>"
    },
    "name": "add_datasource"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesSQLAlchemy URL, e.g. sqlite:////abs/path/file.db, postgresql+psycopg://user:pass@host:5432/db, mysql+pymysql://user:pass@host/db, duckdb:///file.duckdb, oracle+oracledb://user:pass@host:1521/?service_name=ORCLPDB1.
nameYesShort datasource identifier without path separators, e.g. 'shop'.
scanNoScan the schema and profile columns immediately after connecting.
tablesNoTables and views to read, for very large schemas: case-insensitive globs such as ['SALES_*', 'HR.EMP*', '!*_LOG'] (* and ? wildcards, % works like *, _ is literal, schema.table when the pattern has a dot, ! excludes). Tables scanned earlier that fall outside the filter are kept, so a catalog can grow area by area. ['*'] reads everything. Default: the datasource's saved filter, else AUTO_ONTOLOGY_SCAN_TABLES, else all tables. Saved with the datasource for later scans.
schemasNoSchemas to include (default: all non-system schemas).
descriptionNoBrief business summary of what this database holds.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.6.2
    • changedInput schema / properties / description / description
      Previous value: -"What this database holds."New value: +"Brief business summary of what this database holds."
    • changedInput schema / properties / name / description
      Previous value: -"Short name, e.g. 'shop'."New value: +"Short datasource identifier without path separators, e.g. 'shop'."
    • changedInput schema / properties / scan / description
      Previous value: -"Scan the schema right away."New value: +"Scan the schema and profile columns immediately after connecting."
    • addedInput schema / properties / tables
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Tables and views to read, for very large schemas: case-insensitive globs such as ['SALES_*', 'HR.EMP*', '!*_LOG'] (* and ? wildcards, % works like *, _ is literal, schema.table when the pattern has a dot, ! excludes). Tables scanned earlier that fall outside the filter are kept, so a catalog can grow area by area. ['*'] reads everything. Default: the datasource's saved filter, else AUTO_ONTOLOGY_SCAN_TABLES, else all tables. Saved with the datasource for later scans."
      +}
    • changedInput schema / properties / url / description
      Previous value: -"SQLAlchemy URL, e.g. sqlite:////abs/path/file.db, postgresql+psycopg://user:pass@host:5432/db, mysql+pymysql://user:pass@host/db, duckdb:///file.duckdb."New value: +"SQLAlchemy URL, e.g. sqlite:////abs/path/file.db, postgresql+psycopg://user:pass@host:5432/db, mysql+pymysql://user:pass@host/db, duckdb:///file.duckdb, oracle+oracledb://user:pass@host:1521/?service_name=ORCLPDB1."
  2. First observedv0.3.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, idempotentHint=true, openWorldHint=true), it discloses the upsert semantics of name reuse — the URL and saved filter are overwritten while modeled Terms are preserved — and the failure mode ('fails with the connection or driver error if unreachable'). It also clarifies that the read-only guarantee applies to the target database's connection, not to the tool's own local write, which correctly reconciles the 'register' mutation with the readOnly framing.

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?

Four sentences, front-loaded with the core action, then prerequisites, safety, and upsert/error semantics in descending priority. Dense but each sentence carries distinct information; only slight compression is lost by packing prerequisites and the alternative into a single sentence.

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

Completeness5/5

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

For a six-parameter, open-world mutation tool with an output schema (so return values need no explanation), the description covers the selection condition, credential safety, target-database side effects, upsert preservation behavior, and error outcomes. Nothing an agent needs in order to call it correctly is missing.

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?

With schema coverage at 100%, the baseline is 3, but the description adds meaning the schema does not: `name` acts as an upsert key whose reuse updates the URL and saved filter while preserving Terms, and `scan`/`tables` interact with a persisted saved filter. That keying and persistence behavior is not inferable from the per-property descriptions alone.

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

Purpose5/5

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

The description opens with a specific verb and resource ('Register a relational database by SQLAlchemy URL') and names the adjacent capabilities (connectivity verification, optional schema scan). It explicitly distinguishes itself from scan_datasource, so an agent can route between them without inspecting either schema.

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

Usage Guidelines5/5

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

It states the precondition ('Use only when the user supplies a URL'), a prohibition ('never invent credentials'), and an explicit alternative with its condition ('use scan_datasource instead to re-read an already registered database'). Both when-to-use and when-not-to-use are covered.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.