René's URL Explorer Experiment


Title: Response format schema for prompts · Issue #249 · modelcontextprotocol/modelcontextprotocol · GitHub

Open Graph Title: Response format schema for prompts · Issue #249 · modelcontextprotocol/modelcontextprotocol

X Title: Response format schema for prompts · Issue #249 · modelcontextprotocol/modelcontextprotocol

Description: Is your feature request related to a problem? Please describe. Currently, I am developing an MCP server that manages prompt templates for parameterized invocation by clients. The current implementation follows a pattern like promptsHolde...

Open Graph Description: Is your feature request related to a problem? Please describe. Currently, I am developing an MCP server that manages prompt templates for parameterized invocation by clients. The current implementa...

X Description: Is your feature request related to a problem? Please describe. Currently, I am developing an MCP server that manages prompt templates for parameterized invocation by clients. The current implementa...

Opengraph URL: https://github.com/modelcontextprotocol/modelcontextprotocol/issues/249

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Response format schema for prompts","articleBody":"**Is your feature request related to a problem? Please describe.**\nCurrently, I am developing an MCP server that manages prompt templates for parameterized invocation by clients. The current implementation follows a pattern like `promptsHolder.getPrompt({name: \"myPrompt\", arguments: {...}})`, which returns an array of messages to send to the LLM agent.\n\nSome of my prompts require a specific output format from the LLM. At present, I rely on few-shot prompting techniques to enforse desired structured output. However, this approach sometimes leads to inconsistent results, such as not expected enums values, or markdown-style quotation.\n\n**Describe the solution you'd like**\nI propose that the MCP server should be able to specify a JSON schema for the expected response. The schema definition would take place on the server side, while the client would handle the final adaptation for specific host models. A common option to consider could be [response_format](https://platform.openai.com/docs/guides/structured-outputs?api-mode=chat). \n\nA potential implementation might look like this:\n\u003e /server/api/getPrompt/myPrompt\n```\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 2,\n  \"result\": {\n    \"description\": \"Code review prompt\",\n    \"options\": {\n      \"response_format\": {\"type\": \"json_object\", \"schema\": __jsonSchema__},\n    }\n    \"messages\": [\n      {\n        \"role\": \"user\",\n        \"content\": {\n          \"type\": \"text\",\n          \"text\": \"Please review this Python code:\\ndef hello():\\n    print('world')\"\n        }\n      }\n    ]\n  }\n}\n```\n\n**Describe alternatives you've considered**\n- few shots prompting, that works in most cases, but misfires time to time \n- tool calling, when the tool with structured params definition is provided to the model — this is common workaround, and even anthropic [recommended](https://docs.anthropic.com/en/docs/build-with-claude/tool-use/overview#json-output) to use it as claude does not accept a schema parameter, but it still a workaround which add unnecessary complexity\n\n**Additional context**\nThere is related discussion https://github.com/modelcontextprotocol/specification/issues/97 and even same question is [raised](https://github.com/modelcontextprotocol/specification/issues/97#issuecomment-2539110532), but that topic is generally consider another feature.\n\nI understand that such feature significantly increases API-surface. And at least raise some questions. \n\nServer can't be sure for 100% that client or host implement that feature. So it need to proceed validation on own side and even raise errors. Should it be reflected in protocol somehow? Like a requirement from the client to inform the server about the available options.\n\nWould appreciate your thoughts about this feature. Would it be on roadmap or better to consider alternative options?","author":{"url":"https://github.com/gleb-lobastov","@type":"Person","name":"gleb-lobastov"},"datePublished":"2025-03-28T10:46:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/249/modelcontextprotocol/issues/249"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:f8f39a0c-5f68-3e38-ea5d-cbf8813e578d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD964:29812D:2451FB2:30F4219:6A59B0B6
html-safe-nonce2b98baae6186dd3d00061b53a753b0b21dd0e37c353ae0fdb8ad580d240ca77c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTY0OjI5ODEyRDoyNDUxRkIyOjMwRjQyMTk6NkE1OUIwQjYiLCJ2aXNpdG9yX2lkIjoiNDU3MzgyMDI1Mjc5NTI4NTY4NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac1932acc31ea5f420707537d62fb19634e13e16ddd477fa22d83871bc678b0536
hovercard-subject-tagissue:2955767343
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/modelcontextprotocol/249/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3c590e9b63a1c00fb3106e1f2ec2eeae355605e20c2cd969ff8745585a84783b/modelcontextprotocol/modelcontextprotocol/issues/249
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3c590e9b63a1c00fb3106e1f2ec2eeae355605e20c2cd969ff8745585a84783b/modelcontextprotocol/modelcontextprotocol/issues/249
og:image:altIs your feature request related to a problem? Please describe. Currently, I am developing an MCP server that manages prompt templates for parameterized invocation by clients. The current implementa...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamegleb-lobastov
hostnamegithub.com
expected-hostnamegithub.com
Noneba3976babb66479b1c943a8edc0777d96157da48fadc0161f9ddb219deee8353
turbo-cache-controlno-preview
go-importgithub.com/modelcontextprotocol/modelcontextprotocol git https://github.com/modelcontextprotocol/modelcontextprotocol.git
octolytics-dimension-user_id182288589
octolytics-dimension-user_loginmodelcontextprotocol
octolytics-dimension-repository_id862570523
octolytics-dimension-repository_nwomodelcontextprotocol/modelcontextprotocol
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id862570523
octolytics-dimension-repository_network_root_nwomodelcontextprotocol/modelcontextprotocol
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseab680789ae4a316cdaf0d5a292a1760140931cc4
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/249#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fmodelcontextprotocol%2Fissues%2F249
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fmodelcontextprotocol%2Fissues%2F249
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=modelcontextprotocol%2Fmodelcontextprotocol
Reloadhttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/249
Reloadhttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/249
Reloadhttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/249
Please reload this pagehttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/249
modelcontextprotocol https://github.com/modelcontextprotocol
modelcontextprotocolhttps://github.com/modelcontextprotocol/modelcontextprotocol
Notifications https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fmodelcontextprotocol
Fork 1.7k https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fmodelcontextprotocol
Star 8.6k https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fmodelcontextprotocol
Code https://github.com/modelcontextprotocol/modelcontextprotocol
Issues 113 https://github.com/modelcontextprotocol/modelcontextprotocol/issues
Pull requests 80 https://github.com/modelcontextprotocol/modelcontextprotocol/pulls
Discussions https://github.com/modelcontextprotocol/modelcontextprotocol/discussions
Actions https://github.com/modelcontextprotocol/modelcontextprotocol/actions
Projects https://github.com/modelcontextprotocol/modelcontextprotocol/projects
Models https://github.com/modelcontextprotocol/modelcontextprotocol/models
Security and quality 0 https://github.com/modelcontextprotocol/modelcontextprotocol/security
Insights https://github.com/modelcontextprotocol/modelcontextprotocol/pulse
Code https://github.com/modelcontextprotocol/modelcontextprotocol
Issues https://github.com/modelcontextprotocol/modelcontextprotocol/issues
Pull requests https://github.com/modelcontextprotocol/modelcontextprotocol/pulls
Discussions https://github.com/modelcontextprotocol/modelcontextprotocol/discussions
Actions https://github.com/modelcontextprotocol/modelcontextprotocol/actions
Projects https://github.com/modelcontextprotocol/modelcontextprotocol/projects
Models https://github.com/modelcontextprotocol/modelcontextprotocol/models
Security and quality https://github.com/modelcontextprotocol/modelcontextprotocol/security
Insights https://github.com/modelcontextprotocol/modelcontextprotocol/pulse
Response format schema for promptshttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/249#top
dormanthttps://github.com/modelcontextprotocol/modelcontextprotocol/issues?q=state%3Aopen%20label%3A%22dormant%22
enhancementNew feature or requesthttps://github.com/modelcontextprotocol/modelcontextprotocol/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/gleb-lobastov
gleb-lobastovhttps://github.com/gleb-lobastov
on Mar 28, 2025https://github.com/modelcontextprotocol/modelcontextprotocol/issues/249#issue-2955767343
response_formathttps://platform.openai.com/docs/guides/structured-outputs?api-mode=chat
recommendedhttps://docs.anthropic.com/en/docs/build-with-claude/tool-use/overview#json-output
#97https://github.com/modelcontextprotocol/modelcontextprotocol/issues/97
raisedhttps://github.com/modelcontextprotocol/specification/issues/97#issuecomment-2539110532
dormanthttps://github.com/modelcontextprotocol/modelcontextprotocol/issues?q=state%3Aopen%20label%3A%22dormant%22
enhancementNew feature or requesthttps://github.com/modelcontextprotocol/modelcontextprotocol/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.