Skip to main content
Glama

Import from external database

import_from_query
Destructive

Run SQL against a configured external database connection and import the result into an Azquo database. THE SERVER CONNECTS AND FETCHES - the rows never pass through your context, and the credentials are held server-side, so you never see or supply them.

This is the right tool for a business's own internal database. Use list_external_connections to see what is configured; if the source you need is not there, ask an administrator to add it in azquo-admin rather than looking for another route.

TWO WAYS TO SAY WHAT THE COLUMNS MEAN, and you need one of them: Supply 'headings' - a tab-separated Azquo header line matching the SELECT order. The source's own column names are discarded. Right for a one-off load. Omit 'headings' - the source's column names are kept as the header row, and the target database's IMPORT TEMPLATE interprets them. Right for a recurring feed, because the mapping then lives server-side instead of being restated on every run. Check list_import_templates for the database first.

Imported by the same path as POST /api/importdata, so the usual header grammar applies (see Azquo_Skills > Import). Check 'values adjusted' in the result against what you expected.

Input Schema

NameRequiredDescriptionDefault
sqlYesSQL to run against that connection. Read-only queries only - this is an import.
businessNoOptional. The business this call is for, by name, e.g. "azquo" - it then runs there whatever business the session is in. Worth giving on writes when you work in more than one business: a new MCP session starts in the login's own business. list_businesses shows the names.
databaseYesTarget Azquo database name
filenameNoFile name to import under. Import instructions are parsed from it, so it matters. Defaults to <connection>_query.tsv
headingsNoOPTIONAL. Tab-separated Azquo header line, one heading per selected column in the order the SQL returns them. SUPPLY IT for a one-off load: the source's own column names are then discarded and yours are used. OMIT IT for a recurring feed that the target database has an IMPORT TEMPLATE for: the source's column names are kept as the header row and the template interprets them. One or the other is needed - with neither, the import has nothing to tell it what the columns mean.
connectionYesName of the external database connection, from list_external_connections

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / business
      Added value: +{
      +  "description": "Optional. The business this call is for, by name, e.g. \"azquo\" - it then runs there whatever business the session is in. Worth giving on writes when you work in more than one business: a new MCP session starts in the login's own business. list_businesses shows the names.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With annotations already declaring readOnlyHint=false, destructiveHint=true, and openWorldHint=true, the description adds substantial operational context: the server connects and fetches so rows never pass through context, credentials are held server-side and never supplied, the import follows the POST /api/importdata path, and the result should be checked for 'values adjusted'. This is well beyond what the annotations provide.

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 description is front-loaded with the core action and then structured into useful sections for connection behavior, source selection, and heading modes. It is longer than strictly necessary because it repeats some schema-level details for headings, but the organization is clear and most sentences carry useful operational information.

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 destructive, externally-connected import tool with six parameters and no output schema, the description covers the key context: data never enters the agent context, credentials are server-side, column meaning must come from either headings or an import template, and the result should be checked for 'values adjusted'. Nothing essential for correct invocation 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 all six parameters, including business, database, filename, and headings, are already documented in the schema. The description restates the headings decision rule and connection lookup rather than adding new meaning, so the baseline 3 for high schema coverage is appropriate.

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 states a specific verb and resource: run SQL against an external database connection and import the result into an Azquo database. It explicitly distinguishes this from sibling import tools by saying it is the right choice for a business's own internal database, so an agent can tell what it does and when it applies without opening the 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 gives explicit routing guidance: use list_external_connections to see configured sources, ask an administrator via azquo-admin if the source is missing rather than seeking another route. It also spells out the two headings strategies with when to use each (one-off load vs recurring feed) and points to list_import_templates for recurring feeds.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources