Why does the same query result in different tool definitions depending on the source? The version generated from the collection is missing the required input properties, making it unusable for user input.
Hi @kimrla and welcome! So the behavior around operation collections and how their variables are treated is currently a bit different than how they are treated those from local file operations.
For operation collections, any variables set to any valid value (even null) in the Variables panel when saved will be used as a hardcoded override for that operation’s variable. The LLM cannot modify or pass in these values and therefore are omitted from the resulting schema. Taking your example for instance, if the Variables panel has id set to null or ”1234” then every time this operation is called by the LLM, the id variable will always be this value.
To get a similar to behavior to what is seen when using the local file operations source you can simply delete id from the Variables panel and then re-save the operation to update the collection. This will keep it from getting overridden and will be added to the resulting schema.
Thanks for clarifying,@armando.locay. I didn’t expect the variables set in Explorer to affect the MCP server. Could you point me to any documentation where this behavior is described?
Hmmm I’m noticing that the docs might be a bit sparse on these details (Define MCP Tools - Apollo GraphQL Docs), thanks for bringing this up. We will have to update the docs to add some more information around this so it’s more clear.