https://promptfoo.dev/ logo
Run assertions on mcp input
# ❓|questions
u
Is there a way to check if a MCP tool was called? It would also be great if the input could have assertions run on it. We have a need to validate that the correct tools were used by the LLM. My current plan is to create a proxy MCP server and capture the input. I don't want to reinvent something that already exists though.
i
Hi Joshua, I would recommend validating the LLM output directly to look for a tool call. Here's an example if you're using OpenAI:
u
Thanks. That's exactly what I was looking for.