Skip to content

wip: prepare arguments for tool call #218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

wip: prepare arguments for tool call #218

wants to merge 1 commit into from

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