We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Dsazz/mcp-confluence'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
import type { SearchPagesRequest, SearchPagesResponse } from "../models";
import { ValidationError } from "@features/confluence/shared/validators";
import type { SearchPagesUseCase } from "../use-cases";
import { SearchPagesValidator } from "../validators";
/**
* Handler for searching pages
*/
export class SearchPagesHandler {
private validator = new SearchPagesValidator();
constructor(private searchPagesUseCase: SearchPagesUseCase) {}
async handle(request: SearchPagesRequest): Promise<SearchPagesResponse> {
try {
this.validator.validate(request);
return await this.searchPagesUseCase.execute(request);
} catch (error) {
if (error instanceof ValidationError) {
throw error;
}
throw new ValidationError(
`Failed to search pages: ${error instanceof Error ? error.message : "Unknown error"}`,
);
}
}
}