Skip to content

Is it possible to use both local tools and mcp server tools? #797

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
NCCYUNSONG opened this issue May 31, 2025 · 1 comment
Open

Is it possible to use both local tools and mcp server tools? #797

NCCYUNSONG opened this issue May 31, 2025 · 1 comment
Labels
question Question about using the SDK

Comments

@NCCYUNSONG
Copy link

In my agent setting, I set both local tools and mcp server tools, and set model_settings=ModelSettings(
temperature=TEMPERATURE, tool_choice="required"), but the tracing showed only local tools were used. Is it possible to use both local tools and mcp server tools?

@NCCYUNSONG NCCYUNSONG added the question Question about using the SDK label May 31, 2025
@rm-openai
Copy link
Collaborator

Yes it is. tool_choice=required tells the model it must use some tool, but leaves the specific tool up to the model. You could add more stuff to your prompt to guide the model, or use an input that clearly requires the MCP tool.

Also note that the MCP server tool is called as part of the model, so it will show up in the call to responses API in the tracing UI. (i.e. the row that says POST/v1/responses)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question about using the SDK
Projects
None yet
Development

No branches or pull requests

2 participants