# Common issues with advanced functions

When using [advanced functions (function calling)](/en/advanced-features/integrations/functions/advanced-functions.md) , you may run into issues with certain models:

* Function description that is too long;
* Function response that is too long.

Let's look at both in detail 👇

### Description too long

If your function's description exceeds 1,024 characters, **some models (like OpenAI's) may respond with an error and refuse to answer** the user's request. In this case, the Agent will respond with "I'm sorry, my responses are limited. You need to ask me the right questions", regardless of whether the function actually ran or not.

If you have a function with a very long description:

1. Move part of the description to the [instructions](/en/generative-ai/ai-instructions.md);
2. Keep the function description within 1,024 characters.

-> This will allow you, in case of service issues, to quickly switch models and providers without additional configuration.

{% hint style="info" %}
Even though we recommend keeping the description within 1,024 characters, on AIsuru **you can still write longer descriptions**, even though the description field shows a 1,024-character limit.
{% endhint %}

### Function response too long

If your function returns an excessively long response, the language model may refuse to answer with "I'm sorry, my responses are limited. You need to ask me the right questions".

This happens because each language model has a [maximum context limit it can handle](https://github.com/memori-ai/docs/blob/main/en/generative-ai/advanced/providers-api-keys/providers.md#what-is-context). The limit varies by model and is particularly common when you use a web page URL as the function's webhook.

If you need to link to particularly long web pages, we suggest:

1. **Extracting only the relevant text sections** from the page;
2. Providing this information to the Agent in **a more concise format** (such as .txt, .md, or minimized .json);
3. Considering the **use of a model with a larger context window**.

This way, the Agent can process the information without hitting the model's limits.

{% hint style="info" %}
**Note for web browsing**:\
The built-in web search function has a 200,000-character limit for HTML pages. If you're using custom functions to access very long web pages, consider using the built-in web browsing function or pre-processing the content to reduce its size.
{% endhint %}

#### Function name too long

If your function's name exceeds 64 characters, **all providers will return an error** and the function cannot be saved or used.

To fix this:

1. Use concise but descriptive names (e.g., `book_appointment` instead of `book_specialist_medical_appointment_with_email_notification`)
2. Avoid repetition in the name
3. Use common abbreviations where appropriate

{% hint style="warning" %}
The 64-character limit applies to **all providers** (OpenAI, Anthropic, Mistral, etc.) and is a technical constraint.
{% endhint %}

### How do you check if advanced functions are being called?

To verify that your functions are actually being used:

1. Go to the **Conversations** section of your Agent
2. Open a conversation where you think a function was used
3. Look for the debug icon next to messages
4. Click the bug icon  to see the details of the function call

This lets you quickly verify whether your functions are being called and what results they're returning.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aisuru.com/en/advanced-features/integrations/functions/advanced-functions/common-issues-with-advanced-functions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
