Skip to main content
Glama

lib_dblib_info

Inspect an Altium .DbLib file to identify its database provider, connection settings, tables, key fields, symbol and footprint columns; optionally list table columns by opening the database read-only.

Instructions

What a database library (.DbLib) declares, and how it connects.

A DbLib holds no symbols. It names a database (Access, Excel, SQL Server, any ODBC or OLE DB source) and lists the tables whose rows are the components; each row names a symbol in a .SchLib and footprints in .PcbLibs. This reads the .DbLib file itself, inside Altium, and with with_fields opens the database read-only to list each table's columns. Call it first on an unfamiliar DbLib: it says which column is each table's key, which carries the symbol and which the footprints, which is what lib_dblib_get_record and sch_place_dblib_component take.

THE PASSWORD IS NEVER RETURNED. connection.redacted is the connection string with every Password / Pwd value replaced by ***, and has_password says whether there was one.

HOW EACH COLUMN WAS FOUND IS STATED. key_field_source is key_setting or where_clause when the DbLib names it, part_number_column when a column is called Part Number (Altium's default), or first_column as a last resort; treat the last as a guess. settings is the table's section of the file as written, for anything the parsed fields do not cover.

Args: library_path: Full path of the .DbLib (or .SVNDbLib) file. lib_get_installed_libraries lists installed ones with library_type "database". with_fields: True (default) connects to the database to list every table's columns. False reads the file only and opens no connection: use it when the database is slow or unreachable, or to read the connection settings alone.

Returns: {"library_path", "connection": {"provider", "kind" (access / excel / sql_server / odbc / oracle / other), "data_source", "has_password", "redacted", "read_only"}, "left_quote", "right_quote", "search_path", "table_count", "tables": [{"name", "enabled", "schema", "key_field", "key_field_source", "key_field_found", "symbol_ref_field", "symbol_library_field", "description_field", "footprint_fields": [{"ref_field", "library_field"}], "fields" (null when not read), "field_count", "error", "settings"}], "sections", "fields_included", "connected" (null when no connection was attempted)}.

Input Schema

NameRequiredDescriptionDefault
with_fieldsNo
library_pathYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.9/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden and does so: read-only database open, password values replaced by *** with a separate has_password flag, per-table error capture, and connected=null when no connection was attempted. It goes further by disclosing the confidence semantics of key_field_source (key_setting/where_clause are authoritative, first_column is "a guess") — exactly the kind of context annotations could never carry.

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?

The Args and Returns blocks make it scannable and every paragraph is front-loaded with its point. It is somewhat over-long, and the Returns block substantially duplicates an output schema that is already available, which is the only real waste.

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?

An output schema exists, so return-value explanation is optional, yet the description still maps the response shape (connection, tables, key_field_source, fields_included, connected) well enough to reason about results. For a read-only inspection tool with two parameters, nothing an agent needs is missing.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate and it does. library_path is defined down to accepted extensions (.DbLib/.SVNDbLib) and where to discover valid values; with_fields gets its default, its behavior in both states, and concrete conditions for disabling it.

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 statement: it reads a .DbLib file inside Altium and, with with_fields, opens the database read-only to list each table's columns. It also explains the DbLib content model (tables = rows = components pointing at .SchLib symbols and .PcbLib footprints), which distinguishes it from lib_dblib_search (search) and lib_get_installed_libraries (enumeration).

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?

"Call it first on an unfamiliar DbLib" is an explicit routing rule, and it names the downstream tools (lib_dblib_get_record, sch_place_dblib_component) whose arguments this call supplies. It also gives the negative branch for with_fields=False: use it when the database is slow or unreachable, or to read settings alone.

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

Deploy Server

Other Tools