Skip to content

Conversation

eyurtsev
Copy link
Collaborator

@eyurtsev eyurtsev commented Jun 20, 2025

from langgraph.config import get_config

# Define the prepare_arguments function
def prepare_arguments(tool, arguments: dict) -> dict:
    config = get_config()['configurable']
    user_id = config.get("user_id")
    arguments["_meta"] = {"user_id": user_id}
    return arguments


tools = load_mcp_tools(..., prepare_arguments=prepare_arguments)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant