Skip to content

Conversation

@atesgoral
Copy link
Contributor

@atesgoral atesgoral commented Jul 15, 2025

curl has a --json arg to replace this entire boilerplate:

-X POST -H "Content-Type: application/json"

(Edit: Actually -X POST is already redundant in the presence of -d)

See https://daniel.haxx.se/blog/2022/02/02/curl-dash-dash-json/

Updating examples to use modern curl.

Motivation and Context

  1. Reduce verbosity
  2. Promote the --json feature

How Has This Been Tested?

Ran one of the modified commands without errors

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Copy link
Member

@koic koic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! It refines into a simpler command without losing its intent.

@koic koic merged commit ad22407 into modelcontextprotocol:main Jul 15, 2025
5 checks passed
@atesgoral atesgoral deleted the curl-json branch July 15, 2025 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants