[GH-ISSUE #1839] [langchain]: no examples of using (a)invoke to call tools directly #240

Open
opened 2026-02-17 17:19:28 -05:00 by yindo · 0 comments
Owner

Originally created by @nick-youngblut on GitHub (Dec 10, 2025).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/1839

Type of issue

issue / bug

Language

Python

Description

https://docs.langchain.com/oss/python/langchain/tools has no examples of calling tools directly (with or without context).

For example:

from langchain.tools import tool

@tool
def search_database(query: str, limit: int = 10) -> str:
    """Search the customer database for records matching the query.

    Args:
        query: Search terms to look for
        limit: Maximum number of results to return
    """
    return f"Found {limit} results for '{query}'"

search_database.invoke({"query" : "this is a query"})
Originally created by @nick-youngblut on GitHub (Dec 10, 2025). Original GitHub issue: https://github.com/langchain-ai/docs/issues/1839 ### Type of issue issue / bug ### Language Python ### Description https://docs.langchain.com/oss/python/langchain/tools has no examples of calling tools directly (with or without context). For example: ```python from langchain.tools import tool @tool def search_database(query: str, limit: int = 10) -> str: """Search the customer database for records matching the query. Args: query: Search terms to look for limit: Maximum number of results to return """ return f"Found {limit} results for '{query}'" search_database.invoke({"query" : "this is a query"}) ```
yindo added the langchainexternal labels 2026-02-17 17:19:28 -05:00
yindo changed title from [langchain]: no examples of using (a)invoke to call tools directly to [GH-ISSUE #1839] [langchain]: no examples of using (a)invoke to call tools directly 2026-06-05 17:25:50 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#240