Http request tool. How to use it?

I have a small problem that I’ve tried to simplify as much as possible: I don’t know how to get an AI Agent to pass information to a tool

Describe the problem/error/question

I have a trigger with a form that passes a value between 1 and 10 to the AI ​​Agent. The agent, with a GPT-4.1-mini model, has a simple prompt:

  • Enumerate {{ $json[‘number from 1 to 10’] }} mammals that begin with a random letter between a and z
  • Send them to the tool called “send_post” as a single array. What I need is to send “something” that the tool can interpret. The idea is that the AI ​​agent extracts information from a conversation (gender, location, disability: yes/no, date of birth) and sends a post to an endpoint I have in WordPress that stores the data (that part works).

The workflow, simplified:
http://extremaduraformacion.com/animales.json
The endpoint:

What is the error message (if any)?

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: :2.11.4
  • Running n8n via n8n cloud:
  • Operating system: linux

Hi @Paco_Salcedo, welcome to the n8n community!!

in n8n the AI Agent can only pass data to a tool reliably when the tool has a clear input shape and the model is forced to produce that exact shape. The easiest fix is to make your send_post tool accept a single JSON field and then instruct the agent to return only valid JSON that matches it (no extra text, no explanation). The AI Agent is a “tools agent”, so it will call connected tool sub-nodes using their schemas, but it won’t magically invent the right payload if you don’t constrain the output.

Also, make sure your send_post HTTP Request node is configured to send JSON (content-type/application-json) and that you’re actually attaching it as a tool sub-node to the AI Agent, which is a supported pattern in the official HTTP Request docs.

see if this doc helps:
AI Agent node documentation | n8n Docs
HTTP Request node documentation | n8n Docs