mcp example, mock i/o for client-to-server communications

This commit is contained in:
Danny Avila 2025-06-26 13:33:59 -04:00
parent 799f0e5810
commit 7251308244
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
9 changed files with 343 additions and 22 deletions

View file

@ -1,4 +1,5 @@
const express = require('express');
const { addTool } = require('@librechat/api');
const { callTool, verifyToolAuth, getToolCalls } = require('~/server/controllers/tools');
const { getAvailableTools } = require('~/server/controllers/PluginController');
const { toolCallLimiter } = require('~/server/middleware/limiters');
@ -36,4 +37,12 @@ router.get('/:toolId/auth', verifyToolAuth);
*/
router.post('/:toolId/call', toolCallLimiter, callTool);
/**
* Add a new tool to the system
* @route POST /agents/tools/add
* @param {object} req.body - Request body containing tool data
* @returns {object} Created tool object
*/
router.post('/add', addTool);
module.exports = router;