@noanswer/context-compose
Version:
Orchestrate complex AI interactions with Context Compose. A powerful CLI and server for building, validating, and managing context for large language models using the Model Context Protocol (MCP).
29 lines • 1.21 kB
JavaScript
import { executeValidateContextTool } from '../../../src/core/tools/validate-context.js';
import { ValidateContextToolSchema } from '../../../src/schemas/validate-context.js';
import logger from '../logger.js';
/**
* Register Validate Context tool with MCP server
* @param server - FastMCP server instance
*/
export function registerValidateContextTool(server) {
server.addTool({
name: 'validate-context',
description: 'Validate a context file and its referenced component files.',
parameters: ValidateContextToolSchema,
execute: async (args) => {
try {
logger.info('Executing Validate Context tool', args);
const result = await executeValidateContextTool(args);
logger.info('Validate Context tool completed', { result });
return JSON.stringify(result);
}
catch (error) {
logger.error('Error occurred while executing Validate Context tool', {
error: error instanceof Error ? error.message : String(error),
});
throw error;
}
},
});
}
//# sourceMappingURL=validate-context.js.map