Skip to main content
Glama
us-all
by us-all

dbt-list-sources

List dbt sources from manifest.json filtered by source group name or source table substring, enabling quick introspection of project data sources.

Instructions

List dbt sources from manifest.json with optional source-group / name filters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceNameNoFilter by source group name
searchNoSubstring match against source table name
limitNo

Implementation Reference

  • The main handler function for dbt-list-sources. Loads the dbt manifest, iterates over sources filtered by optional sourceName and search, and returns a list of sources with their metadata.
    export async function dbtListSources(args: z.infer<typeof dbtListSourcesSchema>): Promise<unknown> {
      const manifest = loadManifest();
      const out: Array<Record<string, unknown>> = [];
      const search = args.search?.toLowerCase();
      for (const src of Object.values(manifest.sources)) {
        if (args.sourceName && src.source_name !== args.sourceName) continue;
        if (search && !src.name.toLowerCase().includes(search)) continue;
        out.push({
          uniqueId: src.unique_id,
          sourceName: src.source_name,
          tableName: src.name,
          identifier: src.identifier ?? src.name,
          database: src.database,
          schema: src.schema,
          loader: src.loader,
          loadedAtField: src.loaded_at_field,
          hasFreshness: !!src.freshness?.error_after || !!src.freshness?.warn_after,
          tags: src.tags ?? [],
        });
        if (out.length >= args.limit) break;
      }
      return { count: out.length, sources: out };
    }
  • Zod schema defining input parameters for dbt-list-sources: optional sourceName (filter by source group), optional search (substring match on table name), and limit (default 500, max 2000).
    export const dbtListSourcesSchema = z.object({
      sourceName: z.string().optional().describe("Filter by source group name"),
      search: z.string().optional().describe("Substring match against source table name"),
      limit: z.coerce.number().int().min(1).max(2000).default(500),
    });
  • src/index.ts:81-81 (registration)
    Registration of dbt-list-sources tool with its schema and wrapped handler on the MCP server, under the 'dbt' category.
    tool("dbt-list-sources", "List dbt sources from manifest.json with optional source-group / name filters", dbtListSourcesSchema.shape, wrapToolHandler(dbtListSources));
Behavior3/5

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

Without annotations, the description carries the burden. It specifies reading from manifest.json and optional filtering, but omits details like whether the manifest must be pre-loaded or if any side effects exist.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The single-sentence description is extremely concise and front-loaded with the verb 'List' and resource 'sources', containing no unnecessary words.

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

Completeness3/5

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

Given no output schema and limited annotations, the description is minimally adequate but could benefit from mentioning output format or that the tool requires a manifest.json file to be present.

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 coverage is 67% with descriptions for sourceName and search. The description adds no extra meaning beyond summarizing those filters, so it meets baseline but doesn't exceed.

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 clearly states the tool lists dbt sources with optional filters, and the name 'dbt-list-sources' distinguishes it from siblings like 'dbt-list-models'.

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

Usage Guidelines3/5

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

The description mentions optional filters but provides no guidance on when to use this tool versus alternatives like 'dbt-list-models' or 'dbt-list-exposures', nor any prerequisites.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/us-all/dbt-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server