In the Discourse software, you can enclose text in three backtick characters on their own lines:
```json
your copied code or string
```
And then receive a code fence presentation of the original text without alteration except for syntax highlighting:
{
"name": "contact_agent",
"description": "Communicate with recipient (sub-agent) by sending a message.",
"strict": true,
"parameters": {
"properties": {
"recipient": {
"description": "The recipient of the message.",
"title": "Recipient",
"type": "string"
},
"content": {
"description": "The message to send to recipient.",
"title": "Content",
"type": "string"
}
},
"required": [
"recipient",
"content"
],
"title": "contact_agent_args",
"type": "object",
"additionalProperties": false
}
}
The suggestion I would have is that in a developer-provided function, you avoid the use of “recipient”, as that is already an internal name. Then that the function be wholly described within in description fields, saying what it will do and what it is good for, when it shall be called, and what action will result and what will be returned. This one tells the AI nothing.
Then eliminate field like “title” that do not match the tool name itself.
Also, do not refer to “preamble” in any prompting. In your main tool description field, if you want announcement first, simply indicate, “the user must be informed of your intention to invoke this function tool method before you then automatically send to it in the same response”.
See if the AI model calls tools properly when they describe their usefulness fully in a self-contained manner that is not otherwise referred to in prompting.