Skip to main content
HTTP status: 400

When this error occurs

AWS Bedrock’s Converse API rejects any tool name longer than 64 characters. The agent loop’s wire name for an MCP tool is the stitched form {alias}-{tool_name}; for a caller-declared tool it’s the bare name. In the current implementation:
  • Caller-declared tool names are validated synchronously at conversation create against the 64-char cap (along with dash-free / non-empty rules). A violation surfaces as Invalid Caller-Declared Tool Name, not this one.
  • MCP tools are discovered at run start, so the API can’t pre-check their wire-name length. If a discovered {alias}-{tool_name} exceeds 64 chars, Bedrock rejects the inference call and the run lands failed with a downstream Inference Job Result Decode Failed or MCP Protocol Error.
This error class remains in the API for stable docs URLs and possible future use (e.g. a post-discovery validation step). Current callers shouldn’t normally see it.

How to fix

If you do see it:
  • MCP alias too long — shorten the alias (docs over verylonglyalias).
  • MCP tool name too long — fix it on the MCP server side; you can’t rename discovered tools client-side.
  • Caller-declared name too long — shorten the entry in tools[].
Aim for len(alias) + 1 + len(name) ≤ 64 on the stitched wire form.