Skip to main content
Glama

combine_folder_files

Combine CSV or Excel files from a folder into a single Power Query table, with schema-drift safety and per-file error handling.

Instructions

Generate a robust combine-files-from-folder query as a new query: Folder.Files -> filter by extension -> per-file parse -> Table.Combine. Schema-drift safe: it does NOT use Power Query's default 'expand with a sample file' (which silently drops columns only present in later files). fileType = csv | excel. keepFilename adds Source.Name and Source.Folder Path columns; skipErrors wraps each file in try..otherwise so one bad file does not break the refresh. Refresh afterwards.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
fileTypeNocsv | excelcsv
skipRowsNorows to skip before headers (default 0)
delimiterNoCSV delimiter (default ,)
sessionIdYes
folderPathYesthe folder path
skipErrorsNowrap each file in try..otherwise to skip parse errors (default false)
keepFilenameNoadd Source.Name and Source.Folder Path columns (default false)
promoteHeadersNopromote the first row to headers (default true)
Behavior5/5

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

With no annotations provided, the description carries the full transparency burden and does so thoroughly: it states the new query is non-destructive, avoids sample-file expansion to prevent column loss, explains the effect of fileType, keepFilename, and skipErrors, and even notes that a refresh should follow. There is no contradiction with structured metadata.

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 description is four dense sentences that front-load the core verb and resource, then each sentence earns its place by explaining a key behavior: schema-drift safety, fileType semantics, keepFilename output columns, skipErrors behavior, and the refresh expectation. There is no filler or repetition of schema basics.

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 9-parameter tool with no output schema and no annotations, this description is remarkably complete. It covers what query is generated, how it differs from the naive approach, the parameters that affect output columns and error handling, and the refresh follow-up. Remaining details like delimiter and promoteHeaders are already covered by the input schema.

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

Parameters4/5

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

Schema coverage is 78%, so the schema already documents most parameters. The description adds valuable meaning beyond the schema: fileType is tied to the extension filter, keepFilename adds specific Source.Name and Source.Folder Path columns, and skipErrors is explained as per-file try/otherwise protection. It doesn't discuss name/sessionId, but those are standard identifiers and the schema handles the rest.

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+resource: 'Generate a robust combine-files-from-folder query as a new query' and outlines the query pipeline (Folder.Files -> filter by extension -> per-file parse -> Table.Combine). It clearly distinguishes the tool from siblings by naming its schema-drift-safe behavior and the problem it solves.

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

Usage Guidelines4/5

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

It describes the intended scenario (combining files from a folder) and explicitly contrasts the tool with Power Query's default 'expand with a sample file', signaling when this alternative is preferable. It doesn't name a direct sibling tool or provide hard exclusions, but the 'schema-drift safe' framing effectively implies the appropriate use case.

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/cyphonica/powerbi-pbix-mcp'

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