tool_node: Add support for AWS Bedrock "document" content type

### Checked other resources

- [x] This is a bug, not a usage question. For questions, please use the LangChain Forum (https://forum.langchain.com/).
- [x] I added a clear and descriptive title that summarizes this issue.
- [x] I used the GitHub search to find a similar question and didn't find it.
- [x] I am sure that this is a bug in LangChain rather than my code.
- [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
- [x] I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example).
- [x] I posted a self-contained, minimal, reproducible example. A maintainer can copy it and run it AS IS.

### Example Code

```py
import boto3
from typing import List, Dict, Any
from langchain_aws import ChatBedrockConverse
from langchain_core.tools import tool
from langgraph.prebuilt import create_react_agent
from langgraph.checkpoint.memory import MemorySaver

# Setup AWS Bedrock model
bedrock_client = boto3.client("bedrock-runtime", region_name="eu-west-1")
llm = ChatBedrockConverse(
    model="eu.anthropic.claude-sonnet-4-20250514-v1:0",
    client=bedrock_client,
)

@tool
def get_policy_document(query: str) -> List[Dict[str, Any]]:
    """Get company policy document with citations enabled."""
    # This should return document content type for AWS Bedrock citations
    return [
        {
            "type": "document",  # This is the key - should be recognized but isn't
            "document": {
                "format": "txt",
                "name": "company_policy.txt",
                "source": {
                    "text": "Company leave policy: Employees get 20 days annual leave."
                },
                "context": "HR Policy Manual Section 3.2",
                "citations": {
                    "enabled": True
                }
            }
        }
    ]

# Setup memory checkpointer
memory = MemorySaver()

# Create the agent
agent = create_react_agent(
    llm, 
    tools=[get_policy_document],
    checkpointer=memory
)

# Test the agent
config = {"configurable": {"thread_id": "test123"}}
result = agent.invoke({
    "messages": [{"role": "user", "content": "What's the company leave policy?"}]
}, config)

print(memory.get(config=config).get("channel_values").get("messages"))

>>> [
    HumanMessage(
        content="What's the company leave policy?",
        additional_kwargs={},
        response_metadata={},
        id="84597cbe-2b4c-4023-a680-131df813e8bd",
    ),
    AIMessage(
        content=[
            {
                "type": "text",
                "text": "I'll help you find information about the company leave policy. Let me search for that information.",
            },
            {
                "type": "tool_use",
                "name": "get_policy_document",
                "input": {"query": "company leave policy"},
                "id": "tooluse_Un5cKO_STEGKT8cmQ9l_hA",
            },
        ],
        additional_kwargs={},
        response_metadata={
            "ResponseMetadata": {
                "RequestId": "...",
                "HTTPStatusCode": 200,
                "HTTPHeaders": {
                    "date": "Thu, 28 Aug 2025 07:19:09 GMT",
                    "content-type": "application/json",
                    "content-length": "521",
                    "connection": "keep-alive",
                    "x-amzn-requestid": "...",
                },
                "RetryAttempts": 0,
            },
            "stopReason": "tool_use",
            "metrics": {"latencyMs": [1798]},
            "model_name": "eu.anthropic.claude-sonnet-4-20250514-v1:0",
        },
        id="run--33be225c-b276-4fba-9dca-5540bd341f07-0",
        tool_calls=[
            {
                "name": "get_policy_document",
                "args": {"query": "company leave policy"},
                "id": "tooluse_Un5cKO_STEGKT8cmQ9l_hA",
                "type": "tool_call",
            }
        ],
        usage_metadata={
            "input_tokens": 384,
            "output_tokens": 77,
            "total_tokens": 461,
            "input_token_details": {"cache_creation": 0, "cache_read": 0},
        },
    ),
    ToolMessage(
        content='[{"type": "document", "document": {"format": "txt", "name": "company_policy.txt", "source": {"text": "Company leave policy: Employees get 20 days annual leave."}, "context": "HR Policy Manual Section 3.2", "citations": {"enabled": true}}}]',
        name="get_policy_document",
        id="08dc89f0-56ce-49fb-92fc-8d8e3fa47baf",
        tool_call_id="tooluse_Un5cKO_STEGKT8cmQ9l_hA",
    ),
    AIMessage(
        content="Based on the company policy document, here's what I found about the leave policy:\n\n**Company Leave Policy:**\nEmployees get 20 days annual leave.\n\n*Source: HR Policy Manual Section 3.2*\n\nThis appears to be a basic overview of the annual leave entitlement. If you need more detailed information about other types of leave (such as sick leave, maternity/paternity leave, personal leave, etc.) or specific procedures for requesting leave, please let me know and I can search for more comprehensive policy information.",
        additional_kwargs={},
        response_metadata={
            "ResponseMetadata": {
                "RequestId": "...",
                "HTTPStatusCode": 200,
                "HTTPHeaders": {
                    "date": "Thu, 28 Aug 2025 07:19:12 GMT",
                    "content-type": "application/json",
                    "content-length": "815",
                    "connection": "keep-alive",
                    "x-amzn-requestid": "...",
                },
                "RetryAttempts": 0,
            },
            "stopReason": "end_turn",
            "metrics": {"latencyMs": [2531]},
            "model_name": "eu.anthropic.claude-sonnet-4-20250514-v1:0",
        },
        id="run--8fcc797d-27b1-4dad-bf17-aa65b89c73c6-0",
        usage_metadata={
            "input_tokens": 543,
            "output_tokens": 116,
            "total_tokens": 659,
            "input_token_details": {"cache_creation": 0, "cache_read": 0},
        },
    ),
]
```

### Error Message and Stack Trace (if applicable)

_No response_

### Description

I'm trying to use LangGraph with AWS Bedrock to build tools that return document content blocks with citations enabled. When my tools return document structures that conform to the AWS Bedrock Converse API format, I expect these document content blocks to be preserved so that Bedrock can generate citations linking responses back to source documents. However, I'm seeing that any tool output containing document content blocks gets serialized to JSON strings instead of being passed through as structured content. This happens because LangGraph's [msg_content_output](https://github.com/langchain-ai/langgraph/blob/0b4638269b6565e6e0ef055ff4f87c9eb04a8417/libs/prebuilt/langgraph/prebuilt/tool_node.py#L86) function only recognizes a limited set of content block types defined in [TOOL_MESSAGE_BLOCK_TYPES](https://github.com/langchain-ai/langchain/blob/7f9b0772fc5ff509cae19c27bf98ffe5f9f44137/libs/core/langchain_core/tools/base.py#L77): ("text", "image_url", "image", "json", "search_result", "custom_tool_call_output").

The AWS Bedrock Converse API supports document content blocks as shown in their [official documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-runtime/client/converse.html):

```py
'content': [
    {
        'document': {
            'format': 'pdf'|'csv'|'doc'|'docx'|'xls'|'xlsx'|'html'|'txt'|'md',
            'name': 'string',
            'source': {
                'bytes': b'bytes',
                's3Location': {
                    'uri': 'string',
                    'bucketOwner': 'string'
                },
                'text': 'string',
                'content': [
                    {
                        'text': 'string'
                    },
                ]
            },
            'context': 'string',
            'citations': {
                'enabled': True|False
            }
        }
    }
]
```

I don't know how to return this document objects from a tool without them being serialized into a string. In the example above the ToolMessage content results in a string:

```py
ToolMessage(
        content='[{"type": "document", "document": {"format": "txt", "name": "company_policy.txt", "source": {"text": "Company leave policy: Employees get 20 days annual leave."}, "context": "HR Policy Manual Section 3.2", "citations": {"enabled": true}}}]',
        name="get_policy_document",
        id="08dc89f0-56ce-49fb-92fc-8d8e3fa47baf",
        tool_call_id="tooluse_Un5cKO_STEGKT8cmQ9l_hA",
    ),
```

### System Info

System Information
------------------
> OS:  Darwin
> OS Version:  Darwin Kernel Version 24.6.0: Mon Jul 14 11:28:30 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6030
> Python Version:  3.12.4 (v3.12.4:8e8a4baf65, Jun  6 2024, 17:33:18) [Clang 13.0.0 (clang-1300.0.29.30)]

Package Information
-------------------
> langchain_core: 0.3.75
> langchain: 0.3.27
> langchain_community: 0.3.26
> langsmith: 0.4.1
> langchain_aws: 0.2.31
> langchain_elasticsearch: 0.3.2
> langchain_openai: 0.3.25
> langchain_text_splitters: 0.3.9
> langgraph_sdk: 0.2.3

Optional packages not installed
-------------------------------
> langserve

Other Dependencies
------------------
> aiohttp<4.0.0,>=3.8.3: Installed. No version info available.
> async-timeout<5.0.0,>=4.0.0;: Installed. No version info available.
> beautifulsoup4: 4.13.4
> bedrock-agentcore: Installed. No version info available.
> boto3: 1.40.19
> dataclasses-json<0.7,>=0.5.7: Installed. No version info available.
> elasticsearch[vectorstore-mmr]: Installed. No version info available.
> httpx: 0.28.1
> httpx-sse<1.0.0,>=0.4.0: Installed. No version info available.
> httpx>=0.25.2: Installed. No version info available.
> jsonpatch<2.0,>=1.33: Installed. No version info available.
> langchain-anthropic;: Installed. No version info available.
> langchain-aws;: Installed. No version info available.
> langchain-azure-ai;: Installed. No version info available.
> langchain-cohere;: Installed. No version info available.
> langchain-community;: Installed. No version info available.
> langchain-core<1.0.0,>=0.3.66: Installed. No version info available.
> langchain-core<1.0.0,>=0.3.72: Installed. No version info available.
> langchain-deepseek;: Installed. No version info available.
> langchain-fireworks;: Installed. No version info available.
> langchain-google-genai;: Installed. No version info available.
> langchain-google-vertexai;: Installed. No version info available.
> langchain-groq;: Installed. No version info available.
> langchain-huggingface;: Installed. No version info available.
> langchain-mistralai;: Installed. No version info available.
> langchain-ollama;: Installed. No version info available.
> langchain-openai;: Installed. No version info available.
> langchain-perplexity;: Installed. No version info available.
> langchain-text-splitters<1.0.0,>=0.3.9: Installed. No version info available.
> langchain-together;: Installed. No version info available.
> langchain-xai;: Installed. No version info available.
> langchain<1.0.0,>=0.3.26: Installed. No version info available.
> langsmith-pyo3: Installed. No version info available.
> langsmith>=0.1.125: Installed. No version info available.
> langsmith>=0.1.17: Installed. No version info available.
> langsmith>=0.3.45: Installed. No version info available.
> numpy: 2.3.1
> numpy>=1.26.2;: Installed. No version info available.
> numpy>=2.1.0;: Installed. No version info available.
> openai-agents: Installed. No version info available.
> openai<2.0.0,>=1.86.0: Installed. No version info available.
> opentelemetry-api: 1.35.0
> opentelemetry-exporter-otlp-proto-http: 1.35.0
> opentelemetry-sdk: 1.35.0
> orjson: 3.10.18
> orjson>=3.10.1: Installed. No version info available.
> packaging: 24.2
> packaging>=23.2: Installed. No version info available.
> playwright: Installed. No version info available.
> pydantic: 2.11.7
> pydantic-settings<3.0.0,>=2.4.0: Installed. No version info available.
> pydantic<3.0.0,>=2.7.4: Installed. No version info available.
> pydantic>=2.7.4: Installed. No version info available.
> pytest: 8.4.1
> PyYAML>=5.3: Installed. No version info available.
> requests: 2.32.4
> requests-toolbelt: 1.0.0
> requests<3,>=2: Installed. No version info available.
> rich: 14.0.0
> SQLAlchemy<3,>=1.4: Installed. No version info available.
> tenacity!=8.4.0,<10,>=8.1.0: Installed. No version info available.
> tenacity!=8.4.0,<10.0.0,>=8.1.0: Installed. No version info available.
> tiktoken<1,>=0.7: Installed. No version info available.
> typing-extensions>=4.7: Installed. No version info available.
> zstandard: 0.23.0

Labels: bug
State: closed