# Troubleshooting

When interfacing with the Pending AI MCP server, tool calls that contain invalid data or encounter an error related to the Pending AI platform will return an appropriate error message with additional context and directions to help guide a reasoning agent to find a solution.

Input and output schemas with constraints and descriptions are provided to also give context and suggestions to the interfacing agent to better traverse and use the offered tools.

For improved transparency and to help with addressing any client errors, a detailed overview is provided for the possible errors that may be encountered.

## Tool Errors

Tool-specific errors that can cause a tool to "fail", although the error message returned to the agent contains the needed information to resolve it or to provide the needed feedback to a user.

<table data-full-width="false"><thead><tr><th width="325.87109375" valign="middle">Tool</th><th>Details</th><th>Suggestion</th></tr></thead><tbody><tr><td valign="middle"><code>create_molecule_generator_sample</code></td><td>Argument <code>model</code> has a value that matches a model that does not exist.</td><td>Try again using the default model or check the status of the remaining available models.</td></tr><tr><td valign="middle"> </td><td>Argument <code>model</code> has a value that matches a model that is unavailable.</td><td>Try again using the default model or check the status of the remaining available models.</td></tr><tr><td valign="middle"><code>create_retrosynthesis_job</code></td><td>Argument <code>retrosynthesis_engine</code> matches a retrosynthesis engine that does not exist.</td><td>Try again by excluding the field for the next request or list the available engines.</td></tr><tr><td valign="middle"><code>retrieve_retrosynthesis_job</code></td><td>Argument <code>building_block_libraries</code> matches a building block library that does not exist.</td><td>Try again by excluding the field for the next request or list the available libraries.</td></tr><tr><td valign="middle"><code>retrieve_retrosynthesis_job_status</code></td><td>Argument <code>job_id</code> matches a retrosynthesis job that does not exist.</td><td>Try listing retrosynthesis jobs to find job ids that exist and are available.</td></tr><tr><td valign="middle"><code>retrieve_retrosynthesis_job_result</code></td><td>Argument <code>job_id</code> matches a retrosynthesis job that does not exist.</td><td>Try listing retrosynthesis jobs to find job ids that exist and are available.</td></tr><tr><td valign="middle"></td><td>Argument <code>job_id</code> matches a retrosynthesis job that is still being processed.</td><td>Please try again once the job has completed. Poll the job status to see if the job is no longer processing.</td></tr><tr><td valign="middle"><code>delete_retrosynthesis_job</code></td><td>Argument <code>job_id</code> matches a retrosynthesis job that does not exist.</td><td>Try listing retrosynthesis jobs to find job ids that exist and are available.</td></tr><tr><td valign="middle"></td><td>Argument <code>job_id</code> matches a retrosynthesis job that is still being processed.</td><td>Please try again once the job has completed. Poll the job status to see if the job is no longer processing.</td></tr></tbody></table>

{% hint style="info" %}
Tools also have constraints placed on the input arguments that an agent receives, it can be common for an agent to mistake or misname different fields which will return a generic error message. These messages are meant for the agent to be able to fix the issue on its next request or within the same chat.
{% endhint %}

## Service Errors

The Pending AI platform that is interfaced by the MCP server may also encounter errors due to maintenance or high usage traffic. As the platform is made available via a public API[^1], errors are addressed specifically in the previous section, but can also yield a generic error for unhandled issues with the platform.

| HTTP Status                | Details                                                                                                      | Suggestion                                                                                                  |
| -------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- |
| `400 Bad Request`          | Bad request made to the Pending AI server. The request contained invalid content and could not be processed. | Refer to the agent to outline the invalid data provided.                                                    |
| `401 Unauthorized`         | Invalid or expired access token used for authentication.                                                     | Restart your MCP server connection, remove cached access credentials, and reauthenticate.                   |
| `402 Payment Required`     | An error occurred due to payment issues with your Pending AI account.                                        | Contact Pending AI support.                                                                                 |
| `403 Forbidden`            | You do not have permission to access this MCP tool.                                                          | Check your access permissions with the requested service, contact support if you believe there is an error. |
| `422 Unprocessable Entity` | Tool request made to the Pending AI server contained invalid or malformed data.                              | Refer to the agent to outline the invalid data provided.                                                    |
| `429 Too Many Requests`    | Unable to process the request due to rate limiting from too many requests.                                   | Please wait before retrying and employ rate limiting strategies to avoid this issue.                        |
| `502 Bad Gateway`          | The tool is currently unavailable due to server issues that rely on a third-party service.                   | Try again later or contact Pending AI support.                                                              |
| `503 Service Unavailable`  | The tool is currently unavailable due to maintenance or other reasons.                                       | Try again later or contact Pending AI support                                                               |
| `504 Gateway Timeout`      | The tool is currently unavailable due to server issues that rely on a third-party service.                   | Try again later or contact Pending AI support.                                                              |

[^1]: See the [PAI Retro](/api-reference/pai-retro.md) or [PAI Generator](/api-reference/pai-generator.md) APIs for more information.


---

# 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.pending.ai/integrations/agentic-ai/mcp-server/troubleshooting.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.
