Skip to main content
Glama
Auto Ontology MCP

Auto Ontology MCP

by gogoymh

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
AUTO_ONTOLOGY_HOMENoWhere the ontology store, the knowledge store (knowledge.sqlite) and the demo database live~/.auto-ontology-mcp
AUTO_ONTOLOGY_STORENoOntology store file$AUTO_ONTOLOGY_HOME/ontology.db
AUTO_ONTOLOGY_MAX_ROWSNoMaximum number of rows returned by run_sql30
AUTO_ONTOLOGY_MCP_HOSTNoHost address for HTTP transport127.0.0.1
AUTO_ONTOLOGY_MCP_PORTNoPort for HTTP transport8765
AUTO_ONTOLOGY_MCP_TOKENNoToken required for HTTP transport authentication
AUTO_ONTOLOGY_PROFILE_ROWSNoNumber of rows sampled per table to estimate profiling statistics1000
AUTO_ONTOLOGY_QUERY_TIMEOUTNoMaximum time in seconds for query execution30
AUTO_ONTOLOGY_ALLOW_DATASOURCE_TOOLSNoWhether to expose add_datasource and scan_datasource tools1

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Auto Ontology MCP gives you (the model) a semantic layer over relational databases: business Terms mapped to columns, reviewed SQL attributes (measures, filters, joins) and verified relationships between tables. The server does the deterministic work (schema extraction, profiling, key inference, validation, read-only execution). You do the language work that NVIDIA Auto Ontology normally sends to its own LLM.

Answering a data question (always in this order):

  1. check_readiness: is there a modeled datasource that can execute SQL?

  2. check_answerable(question, entities): extract the entity phrases yourself, see which the ontology covers. If something material is not covered, say so and ask; do not guess.

  3. get_query_context(terms): columns, sample values, SQL attributes, the join path and verified example queries for the Terms you will use.

  4. lookup_values for any literal filter (names, statuses, places) you are not sure about.

  5. Write the SQL yourself in the datasource dialect, using the join path and SQL attributes.

  6. validate_sql, fix every error, take warnings seriously (fan-out, near-miss literals, unverified joins, percent-vs-fraction).

  7. run_sql with the user's question. Check the rows against the question before you answer, show the SQL, and mention truncation and any uncertified (draft) Terms you relied on.

  8. If the user confirms the answer is right, save_example_query so the next answer reuses it.

Building an ontology: add_datasource → scan_datasource → get_modeling_worklist / save_table_terms until no tables remain → list_relationships / set_relationship to review proposed joins → suggest_sql_attributes / save_sql_attribute → certify what a person approved with update_term(status="certified").

Keeping personal knowledge (datasource "knowledge", created on first use): when the user shares documents, images, notes or facts to remember, read them yourself and store what they contain. search_ontology first and reuse existing Terms instead of creating near-duplicates. Facts you would count, sum, filter or compare go into entities (define_entity, then add_records with a source); explanations, ideas and definitions go into concepts (save_concept) linked by typed relations. Every record and concept should name its source. Ask before deleting anything. list_terms is the index and recent_changes the log. For "what is X / what do I know about X", answer from get_term (definition, body, relations, sources); for totals, counts and comparisons, use SQL as for any datasource. Cite sources (get_source, or join _source_id = sources.id). When an answer is worth keeping, file it back: append it to a concept's body or save_example_query. export_wiki writes the store as an Obsidian vault the user can browse.

Search is lexical, not semantic. Search with the words the schema uses; if the user writes in another language, translate entity phrases to the ontology's language first, and try synonyms. Add the user's own words as Term synonyms with update_term so the next search finds them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": true
}
resources
{
  "subscribe": false,
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
check_readinessA

Start here. Lists every datasource with whether SQL can run against it, how much of it is modeled (Terms, relationships, SQL attributes) and what to do next.

add_datasourceA

Register a database (connections are always read-only) and, by default, scan it. Use only when the user gives you a connection URL; never invent credentials.

scan_datasourceA

Read (or re-read) tables, columns and declared keys; profile column values (samples, uniqueness, date formats, small value sets); infer undeclared primary/foreign keys by name and confirm them by value containment. Existing Terms and reviewed relationships are kept.

get_modeling_worklistA

Next tables that still need business Terms, with everything needed to name them: candidate columns with types, sample values, uniqueness and formats, foreign keys and the Terms they point to, plus the modeling rules. Then call save_table_terms once per table. Repeat until remaining is 0.

save_table_termsA

Save the Terms you propose for one table and map its columns to them. Replaces this table's previous Terms (Terms with SQL attributes are kept). New Terms start as draft; editing a certified Term's meaning returns it to draft. Unassigned candidate columns are attached to the first Term.

list_relationshipsA

Joins between tables with their evidence (declared, inferred by name and value containment, or added manually), roles when several columns point at the same table, and identifier columns that have no relationship yet. Review proposed ones with set_relationship.

set_relationshipA

Accept, reject, add, annotate or delete a join between two columns. Reviewed relationships survive re-scans. Only accepted relationships are used for join paths.

suggest_sql_attributesA

Candidate SQL attributes (reusable measures, filters, join patterns) mined from executed and verified queries, bridge tables and column profiles, with the rules for judging them. Save the good ones with save_sql_attribute.

save_sql_attributeA

Create, update, certify or delete a named SQL expression under a Term. The expression is executed read-only against the database before it is saved, so a broken one is rejected with the error.

update_termA

Edit, certify, deprecate or delete a Term. Changing the name or description of a certified Term returns it to draft unless you also pass status.

save_glossaryC

Maintain the glossary of abbreviations and internal jargon (MRR → monthly recurring revenue). Glossary entries are returned with query context and searched like Terms.

define_entityA

Create an entity in the personal knowledge store (a Term with its own table), add columns to it as you learn more, or delete it. Column types: text, integer, number, date, datetime, boolean, ref: (a link that becomes a relationship). Every record also gets id, _source_id, _source_locator, _evidence, _note and timestamps.

Storing knowledge (Auto Ontology's model applied to personal knowledge):

  1. Reuse before you create: search_ontology for the thing first. One Term per real-world kind of thing, named in the singular as people say it (Receipt, Book, Person, Workout).

  2. Entities hold facts you will count, sum, filter or compare. Give columns snake_case English names and the right type (text, integer, number, date, datetime, boolean, ref:). Put the unit in the name or description (amount_krw, distance_km). Use ref columns for things that recur (merchant, author, place) instead of repeating text; add_records creates the referenced rows by name. Set keys when a natural identifier exists (isbn, receipt_no) so re-ingesting updates instead of duplicating.

  3. Concepts hold meaning: a one-sentence definition, a markdown body (what it is, how it works, examples, open questions) and typed relations: is_a, part_of, has_part, instance_of, related_to, depends_on, causes, used_for, contrasts_with, same_as, example_of. A Term can be both: an entity with records and a body that explains it.

  4. Provenance on everything: pass source={title, kind, uri, ...} (or a source id) and, per record, _locator (page, timestamp, line) and _evidence (the quote or number as written).

  5. Never invent values. Leave unknown fields out; record ambiguity in _note.

  6. Certified means a person confirmed it. New knowledge is draft; do not certify on your own.

add_recordsA

Store facts you extracted from what the user shared (receipts, statements, reading notes, logs). All records are validated first; if any is wrong nothing is written and every problem is listed. Records matching existing ones by key (or identical ones) update or are skipped instead of duplicating.

edit_recordsA

Correct or delete records by id. Deleting a record that other records reference is refused. Confirm with the user before deleting.

save_conceptA

Create or update a concept: a Term with a definition, a markdown body (a wiki page) and typed relations to other Terms. Works on entity Terms too, to explain them. Targets that do not exist yet become empty concepts to fill in later.

get_sourceA

One source with its summary and content, and everything stored from it: records per entity, concepts and relations. Use it to cite where an answer came from.

list_termsA

The index of a datasource: every Term (entities and concepts) with its one-line definition, status, synonyms, record and relation counts, and which concepts are still empty. Read it before adding knowledge, to reuse Terms instead of creating near-duplicates.

recent_changesB

The log: what was added, changed, certified or deleted recently, newest first.

export_wikiA

Write the ontology (by default the knowledge store) as markdown pages that Obsidian can open: one page per Term with synonyms as aliases and relations as [[links]], one page per source, an index.md and a log.md. The folder is ~/.auto-ontology-mcp/wiki/; re-exporting replaces generated pages only. It is a one-way view: edits made in Obsidian are not read back.

search_ontologyA

Lexical search across Terms (entities and concepts, including their bodies and relations), synonyms, mapped columns, SQL attributes, glossary, verified example questions, sources (title, summary, content) and unmodeled tables. In the knowledge store it also finds records by their stored text ('value' hits; request kind 'value' to search another datasource's data). Not semantic: use the schema's vocabulary, try synonyms, translate.

get_termB

One Term: definition, status, synonyms, mapped columns with sample values and formats, SQL attributes and related Terms with their join conditions and multiplicity.

describe_tableC

A physical table with its Terms, columns (and the attributes mapping them), relationships and SQL attributes.

find_join_pathA

Shortest chain of accepted relationships between two Terms or tables, with ON conditions, a ready FROM/JOIN clause, fan-out warnings and alternative roles (e.g. billing vs delivery city).

check_answerableA

Cheap pre-flight: does the ontology cover every entity of the question? Returns coverage, a verdict (answerable, uncertain, partially_answerable, not_answerable) and the best matches per entity. When something material is not covered, tell the user instead of substituting a similar measure.

get_query_contextB

Everything needed to write the SQL: qualified tables, mapped columns with sample values and formats, SQL attributes, the join path connecting the Terms (with a ready FROM/JOIN clause and role notes), verified example queries, glossary and the SQL rules for this dialect.

lookup_valuesA

Real values stored in a column, to ground literal filters ('Pennsylvania', a product name, a status code) before you write them into SQL.

validate_sqlA

Check a query before running it: read-only guard, unknown tables/columns, joins that are not (or not the default) relationships in the ontology, wrong-looking literals (near-miss values, percent vs fraction), one-to-many fan-out under SUM/AVG/COUNT, and a dry run. Also reports which Terms the query relies on and whether they are certified.

run_sqlA

Execute a read-only query and return columns, rows, row_count and truncated, plus the Terms it used and warnings. Writes, DDL and multiple statements are refused; the connection itself is read-only. Present the SQL with the answer and say when results are truncated.

save_example_queryA

Store a question and SQL pair the user confirmed as correct. Verified examples are offered by get_query_context for similar questions and mined by suggest_sql_attributes.

export_ontologyA

The whole semantic layer of a datasource as one YAML/JSON document (Terms, column mappings, SQL attributes, relationships, glossary, example queries), for review or version control.

import_ontologyB

Apply an exported document to a scanned datasource (matching tables and columns by name).

searchB

Search the ontology documents (Terms and tables) across all datasources. Returns ids for fetch.

fetchA

Full text of one ontology document (a Term with its attributes, SQL attributes and relationships, or a table).

Prompts

Interactive templates invoked by user choice

NameDescription
build_ontologyWalk through modeling a datasource end to end.
answer_questionAnswer a data question through the ontology.
rememberStore what I shared (files, images, notes) in the knowledge store.
review_ontologyFind gaps and risks in the current ontology.

Resources

Contextual data attached and managed by the client

NameDescription
guideHow to use this server.

TDQS

B3.3/5.0

Scored across 33 tools

Disambiguation3/5

Most tools target distinct operations, but several search/retrieval tools overlap: search_ontology, search, fetch, get_term, list_terms and describe_table can all surface Term or table information. Similarly, define_entity, save_concept, save_table_terms and update_term all create/update Terms in different scopes, forcing the agent to reason carefully about which one to use.

Naming Consistency4/5

Predominantly verb_noun (get_term, save_sql_attribute, validate_sql, find_join_path), with only minor deviations like recent_changes, search and fetch. The convention is predictable overall.

Tool Count2/5

With 33 tools, the surface is well above the 3–15 sweet spot and includes redundant search/read tools. Although the domain is broad, the set feels overgrown and could be consolidated.

Completeness4/5

Covers datasource registration/scanning, Term modeling, relationships, SQL attributes, glossary, query validation/execution, export/import, personal knowledge records, concepts, sources and wiki export. Minor gaps include no delete-datasource operation and no explicit datasource listing beyond check_readiness.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues