Skip to main content
Glama
Auto Ontology MCP

Auto Ontology MCP

Scan database schema and profiles

scan_datasource
Idempotent

Refreshes a registered database's stored metadata by re-reading tables, columns, keys, column profiles, and value-verified inferred joins after schema changes or stale profiles.

Instructions

Re-read a registered database's tables, columns, declared keys, column profiles (samples, uniqueness, formats, small value sets), and name-inferred joins verified by value containment. Use after schema changes or to refresh stale profiles; use add_datasource for new databases and get_modeling_worklist to inspect unmodeled tables afterwards. Connects read-only to the database, preserves existing Terms, reviewed relationships, and SQL attributes, refreshes unreviewed inferred joins, and returns counts of newly discovered tables and columns.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "scan_datasource"
  }
}

Input Schema

NameRequiredDescriptionDefault
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. Applies to this scan only.
profileNoSample rows to profile columns and verify inferred joins.
schemasNoLimit this scan to these database schemas.
datasourceNoDatasource name. Optional when only one datasource is registered.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.6.2
    • changedInput schema / properties / profile / description
      Previous value: -"Sample rows to profile columns and test inferred joins."New value: +"Sample rows to profile columns and verify inferred joins."
    • changedInput schema / properties / schemas / description
      Previous value: -"Limit the scan to these schemas."New value: +"Limit this scan to these database schemas."
    • 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. Applies to this scan only."
      +}
  2. First observedv0.3.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: it states the connection to the source DB is read-only, that Terms, reviewed relationships, and SQL attributes are preserved, that only unreviewed inferred joins are refreshed, and that counts of new tables/columns are returned. The read-only-to-database claim is consistent with readOnlyHint=false, since the tool still writes the ontology catalog — the description resolves that ambiguity rather than contradicting it.

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?

Three dense sentences, front-loaded with the read scope and followed by usage routing and side-effect preservation. Every clause carries information, though the enumeration of profile sub-details (samples, uniqueness, formats, small value sets) is slightly heavier than needed for tool selection.

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 no-required-param, idempotent rescan tool with a full schema and an output schema, the description covers the remaining unknowns: side effects on curated content, what gets refreshed versus preserved, and the fact that counts are returned. Nothing an agent needs to decide or call correctly is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so globs, defaults, and precedence (saved filter → env var → all tables) are already fully documented in the schema. The description adds only the framing that filtering exists for very large schemas and that the filter applies to this scan only, which is modest added meaning over a schema that already carries the heavy lifting.

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?

Specific verb ('Re-read') plus a precise enumeration of the resource: tables, columns, declared keys, column profiles, and value-containment-verified inferred joins. It explicitly separates itself from add_datasource (new databases) and get_modeling_worklist (unmodeled tables), so an agent can pick it without opening siblings.

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?

Gives an explicit trigger ('after schema changes or to refresh stale profiles') and names two alternatives with the conditions that select them: add_datasource for new databases, get_modeling_worklist to inspect unmodeled tables afterwards. This is a full when/when-not/alternative routing statement.

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