Skip to content
How to specify usin...
 
Notifications
Clear all

How to specify using OpenAI Tool (Custom MCP) via AI Agent

2 Posts
1 Users
0 Reactions
4 Views
Kiwi-Racer
(@kiwi-racer)
Posts: 2
New Member
Topic starter
 

I'm utilizing the new Tool feature in the OpenAI API to expose my MCP Server within the OpenAI dataset. It's functioning well on the OpenAI Playground. I provide a prompt to which my tool is added, and when I execute prompts, the LLM calls my Tool and incorporates my dataset.

OpenAI offers code examples for calling Prompts via their API, using the syntax below. My challenge is that the callin.io OpenAI connector doesn't seem to have a way to set these header values. I've also attempted (a) adding it to system prompts and (b) specifying it within the main Prompt, without success. I've traced my MCP server, configured in the OpenAI Environment (Cloud), and I'm not seeing any calls to it.

Has anyone figured out how to accomplish this? Here's the example OpenAI provides when you save the prompt (which includes my MCP tool definition, along with default values like model, temp, etc.) and how to specify it as part of the call:

bash
curl https://api.openai.com/v1/responses
-H "Content-Type: application/json"
-H "Authorization: Bearer $OPENAI_API_KEY"
-d '{
"prompt": {
"id": "pmpt_hiddenID",
"version": "1"
}
}'

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your callin.io setup

  • callin.io version:
  • Database (default: SQLite):
  • callin.io EXECUTIONS_PROCESS setting (default: own, main):
  • Running callin.io via (Docker, npm, callin.io cloud, desktop app):
  • Operating system:

Please provide the rewritten markdown content *it should be in the markdown format.

 
Posted : 25/06/2025 5:06 am
Kiwi-Racer
(@kiwi-racer)
Posts: 2
New Member
Topic starter
 

I managed to get this working using the following:

javascript
const response = await openai.responses.create({
model: ‘gpt-4.1’,
tools: [
{
"type": "mcp",
"server_label": "YYY",
"server_url": "<a href="https://YYY/mcp" rel="noopener nofollow ugc"> https://YYY/mcp</a> ;",
"allowed_tools": [
"find_AAA",
"find_YYY"
],
"require_approval": "never"
}
],
input: userInput
});

 
Posted : 25/06/2025 6:27 pm
Share: