yeah good luck reliably teaching your agent how to use a novel REST api, esp a REST api that is niche or doesn't really exist publicly. it's far more natural for it to be a tool call available to it.
i have an mcp that hosts a clangd server plus a skill to use it to perform LSP queries against a codebase
that allows for the language server to persist across calls