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
export interface ProgressPayload {
current: number;
total?: number;
}
export type ProgressCallback =
| ((progress: ProgressPayload) => void)
| undefined;
export interface PeriodicProgressOptions {
total?: number;
throttleModulo?: number;
force?: boolean;
}
export function reportPeriodicProgress(
onProgress: ProgressCallback,
current: number,
options: PeriodicProgressOptions = {}
): void {
if (!onProgress || current === 0) return;
const throttleModulo = options.throttleModulo ?? 1;
const force = options.force ?? false;
if (!force && throttleModulo > 1 && current % throttleModulo !== 0) {
return;
}
onProgress({
current,
...(options.total !== undefined ? { total: options.total } : {}),
});
}