#!/bin/bash
set -e

API_KEY="114521f3f9e6858480d6269446a446ef"
URL="http://localhost:3456/mcp"
SESSION_ID="f899450c-97ff-4763-81c3-a77ad3acf78b"

SEARCH_RESP=$(curl -s -D - -X POST "$URL" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "x-api-key: $API_KEY" \
  -H "mcp-session-id: $SESSION_ID" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"search_messages","arguments":{"q":"test","account":"gmail","maxResults":3}}}')

echo "$SEARCH_RESP"
