#!/bin/sh
# From an agent: call the MCP tool search_studies over Streamable HTTP (revision 2026-07-28).
# The body is mcp_call.json; run from the folder that holds it. Set LTS_BASE_URL to call another host.
curl --fail-with-body --silent --show-error \
  --header "Content-Type: application/json" \
  --header "Accept: application/json, text/event-stream" \
  --header "MCP-Protocol-Version: 2026-07-28" \
  --header "Mcp-Method: tools/call" \
  --header "Mcp-Name: search_studies" \
  --data @mcp_call.json \
  "${LTS_BASE_URL:-https://layersofthesouth.org}/api/mcp"
