listConfigs
Find configuration files in your workspace using glob patterns to locate JSON, YAML, TOML, and other config formats for development settings management.
Instructions
List configuration files in the workspace matching specified patterns
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| include | No | Glob patterns for config files |
Implementation Reference
- src/index.ts:112-132 (registration)Full registration of the 'listConfigs' MCP tool, including name, description, input schema, and handler function.mcp.tool( "listConfigs", "List configuration files in the workspace matching specified patterns", { include: z .array(z.string()) .default(["**/*.{json,jsonc,yaml,yml,toml}"]) .describe("Glob patterns for config files"), }, async ({ include }: { include: string[] }) => { try { const items = await searchFiles("", include, { listOnly: true, maxResults: 200 }); return { content: items }; } catch (error) { return { content: [{ type: "text", text: `Error listing configs: ${error}` }], isError: true, }; } } );
- src/index.ts:121-131 (handler)Handler function that implements the core logic of listConfigs by using searchFiles to list configuration files matching the given glob patterns.async ({ include }: { include: string[] }) => { try { const items = await searchFiles("", include, { listOnly: true, maxResults: 200 }); return { content: items }; } catch (error) { return { content: [{ type: "text", text: `Error listing configs: ${error}` }], isError: true, }; } }
- src/index.ts:115-120 (schema)Zod input schema defining the 'include' parameter as an array of glob patterns for finding config files, with a sensible default.{ include: z .array(z.string()) .default(["**/*.{json,jsonc,yaml,yml,toml}"]) .describe("Glob patterns for config files"), },