logoalt Hacker News

mooredsyesterday at 10:37 PM1 replyview on HN

For pure OpenAPI APIs, why wouldn't you just update your API docstrings? Or maybe add a new attribute to the OpenAPI spec for LLM prompts?

I definitely see the value if you have a non standard API or undocumented API you wanted to expose.

And I see value in the resources and prompts parts of MCP, since they can offer clients more functionality that would be hard to put into an API spec.


Replies

kloudtoday at 8:18 AM

Exactly, having some metadata on OpenAPI and then have a generic openapi-mcp-gateway seems like a useful approach. Or being it a part of a web framework, given routes also expose MCP endpoint.

The takeaway is to go beyond the bare minimum and put the effort to optimize the docs/prompts, ideally having some evals in place.

For the prompts and resources part of the spec I haven't found much use for those yet. It seems like output of tool calls is enough to get content into the context.