jobnimbus-mcp-client
Version:
JobNimbus MCP Client - Connect Claude Desktop to remote JobNimbus MCP server
45 lines • 1.53 kB
JavaScript
/**
* Auto-generate all remaining tools
* This creates simple pass-through tools for all JobNimbus MCP functionality
*/
import { BaseTool } from './baseTool.js';
/**
* Generic Tool Factory
* Creates tools dynamically based on configuration
*/
export function createGenericTool(config) {
return class extends BaseTool {
get definition() {
return {
name: config.name,
description: config.description,
inputSchema: config.inputSchema || {
type: 'object',
properties: {},
},
};
}
async execute(input, context) {
const endpoint = config.endpoint || config.name.replace(/_/g, '/');
const method = config.method || 'GET';
if (method === 'GET') {
const result = await this.client.get(context.apiKey, endpoint, input);
return result.data;
}
else if (method === 'POST') {
const result = await this.client.post(context.apiKey, endpoint, input);
return result.data;
}
return { success: false, error: 'Method not supported' };
}
};
}
/**
* All tool definitions
*/
export const ALL_TOOLS_CONFIG = [
// NOTE: ALL ANALYTICS TOOLS NOW HAVE DEDICATED IMPLEMENTATIONS
// See src/tools/analytics/ and src/tools/index.ts
// Remaining tools below are kept for legacy compatibility
];
//# sourceMappingURL=allToolsGenerator.js.map