Large model question and answer method and device based on tool call, storage medium and equipment
By creating a proxy object within the MCP Server and injecting the calling logic code, the problem of unstable tool calls caused by the heterogeneity of LLM processing capabilities was solved, resulting in more accurate question-and-answer results and token savings.
CN122152976APending Publication Date: 2026-06-05BEIJING UCAP INTERNET TECH
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING UCAP INTERNET TECH
- Filing Date
- 2026-01-26
- Publication Date
- 2026-06-05
AI Technical Summary
Technical Problem
The execution logic of tools in the MCP Server is encapsulated and cannot be interfered with externally. The different processing capabilities of LLM can lead to unstable tool calls or incorrect results.
Method used
Create a proxy object within the MCP Server and inject the call logic code, including pre- and post-call business logic and logging logic, monitor and aggregate the tool call process, and ensure that the LLM works according to the normal process.
Benefits of technology
It enables global monitoring of the tool invocation process, avoids unstable or erroneous results, improves the accuracy of question and answer, and reduces token consumption.
✦ Generated by Eureka AI based on patent content.
Smart Images

Figure CN122152976A_ABST
Abstract
The application discloses a large model question and answer method and device based on tool calling, a storage medium and equipment, and belongs to the technical field of deep learning. Tool information of a tool list in an MCP Server is acquired; a proxy object is created for each tool in the tool list according to the tool information, and code for modifying calling logic of the tool is injected into the proxy object, the code including at least one of pre-calling business logic code, log recording logic code and post-calling business logic code; the tool information is sent to an LLM; tool calling information sent by the LLM for a question input by a user is received, and a corresponding proxy object is determined according to the tool calling information; the tool is called based on the modified calling logic by using the proxy object, and a calling result is sent to the LLM, so that the LLM generates an answer to the question according to the calling result. The application can realize global monitoring of a tool calling process, thereby improving the accuracy of question and answer.
Need to check novelty before this filing date? Find Prior Art