We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/j0hanz/fs-context-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
import type { globEntries } from './glob-engine.js';
export interface GlobConfig {
cwd: string;
pattern: string;
excludePatterns?: readonly string[];
includeHidden?: boolean;
baseNameMatch?: boolean;
caseSensitiveMatch?: boolean; // Default true if undefined
followSymbolicLinks?: boolean; // Default false
onlyFiles?: boolean; // Default true
stats?: boolean; // Default false
maxDepth?: number;
suppressErrors?: boolean;
}
/**
* Builds standard options for globEntries to ensure consistency across search tools.
*/
export function buildGlobOptions(
config: GlobConfig
): Parameters<typeof globEntries>[0] {
const options: Parameters<typeof globEntries>[0] = {
cwd: config.cwd,
pattern: config.pattern,
excludePatterns: config.excludePatterns ?? [],
includeHidden: config.includeHidden ?? false,
baseNameMatch: config.baseNameMatch ?? false,
caseSensitiveMatch: config.caseSensitiveMatch ?? true,
followSymbolicLinks: config.followSymbolicLinks ?? false,
onlyFiles: config.onlyFiles ?? true,
stats: config.stats ?? false,
};
if (config.suppressErrors) {
options.suppressErrors = config.suppressErrors;
}
if (config.maxDepth !== undefined) {
options.maxDepth = config.maxDepth;
}
return options;
}