Skip to content

Request inputs

The CLI’s --input-json option supplies explicit input locations and JSON types to an API operation. Its value is an object containing path, query, header, or body.

You need an authenticated CLI and the API’s current contract. The examples below are request previews. They do not retrieve videos, stories, or restaurants.

  1. Read the input location and type.
  2. Preview the request with typed values.
  3. Execute the request when you need the data.

Read the contracts for these APIs.

Terminal window
agent-data docs youtube-com
agent-data docs news-ycombinator-com
agent-data docs opentable-com

youtube-com, news-ycombinator-com, and opentable-com are readable API handles. Each identifies an API for that website.

Select an operation’s route slug from the contract. Read its parameters and request_body_contract.

OperationInputLocation and type
YouTube search-videosqueryA required string in the query string.
Hacker News feeds-by-feedfeedA required path string containing a feed name.
OpenTable restaurants-searchcityA required string in the query string.
OpenTable restaurants-searchmax_page_size, strict_locationAn optional integer and boolean in the query string.
Terminal window
agent-data call youtube-com search-videos \
--input-json '{"query":{"query":"python programming"}}' \
--dry-run

The outer query selects the location. The inner query names this endpoint’s input. The captured preview resolves GET /v1/search-videos?query=python+programming with no body.

Terminal window
agent-data call news-ycombinator-com feeds-by-feed \
--input-json '{"path":{"feed":"news"}}' \
--dry-run

The feed name news selects the Hacker News front page. The preview replaces {feed} in /v1/feeds/{feed} with that name. See the captured feed response.

This CLI 0.13.0 excerpt from November 17, 2026 omits all headers.

{
"dry_run": true,
"method": "GET",
"url": "https://api.agent-data.dev/news-ycombinator-com/v1/feeds/news",
"body": null
}
Terminal window
agent-data call opentable-com restaurants-search \
--input-json '{"query":{"city":"San Francisco","max_page_size":3,"strict_location":true}}' \
--dry-run

max_page_size is an integer, and strict_location is a boolean. The CLI checks those JSON types before encoding the query string.

The November 17, 2026 preview returns this request. The excerpt omits all headers.

{
"dry_run": true,
"method": "GET",
"url": "https://api.agent-data.dev/opentable-com/v1/restaurants/search?city=San+Francisco&max_page_size=3&strict_location=true",
"body": null
}

For an operation with a JSON body, set body.contentType to application/json. Put its fields in body.value. Preserve the types required by the operation’s request_body_contract.

body.value becomes the request body. The surrounding object controls the CLI input format. The example operations above have no request body.

The header object accepts input names from the operation’s contract. Use it only for headers that the contract defines. These example operations have no such header inputs.

The CLI supplies authentication separately. Do not put your API key in the input object.

  1. Check method, url, and body against the current contract.
  2. Remove --dry-run when you intend to make the data call.
  3. Read the response using that API’s schema.

The previews establish request construction. The YouTube call supplies a complete example with a successful data response.

What you seeWhat to do
The CLI reports overlapping values.Supply each parameter once, through the typed object or an ordinary flag.
A required field is missing.Read the contract’s required inputs. Add the missing value.
The CLI rejects an input type.Supply the JSON type from the contract.
The CLI reports an unsupported or missing contract.Read input_contract_issues. Preserve the reported issue for support.

Repeat the preview after the correction. The missing-query example shows an actual failure and correction.

Download the captured previews for exact inputs, timestamps, and selected outputs.

HTTP sends values at their contract-defined locations. MCP uses the call tool’s arguments, which differ from the CLI’s typed object.