
langchain4j-tool-function-calling-patterns
Provides and generates LangChain4j tool
by giuseppe-trisciuoglioFree
Description
LangChain4j Tool & Function Calling Patterns is an agent skill for letting LLMs call Java code through LangChain4j. Methods are exposed as tools with the @Tool annotation, parameters get descriptions with @P to guide the model, and tools are registered on a chat model through AiServices.builder().tools(). The skill covers configuring tool executors, validating parameters, handling execution errors, timeouts and hallucinated tool names, injecting user state with @ToolMemoryId, and dynamic tool providers for large or conditional tool sets. Typical uses are agents that query databases, call APIs or do calculations. It is part of giuseppe-trisciuoglio/developer-kit.…
Highlights
- @Tool and @P annotations
- Registering tools with AiServices
- Error, timeout and bad tool-name handling
- Context-aware tools with @ToolMemoryId
- Dynamic tool providers
Ratings & Reviews
No ratings yet
Be the first to rate langchain4j-tool-function-calling-patterns.
People also visit
langchain4j-tool-function-calling-patterns FAQ
How are Java methods exposed to the model?
With the @Tool annotation, plus @P on parameters to describe them, and registration through AiServices.builder().tools().
How do I add it to my agent?
Use `npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill langchain4j-tool-function-calling-patterns`. The skill is then available to your agent alongside your other skills.
Does it cover failure cases?
Yes: tool execution errors, timeouts and hallucinated tool names.
Can tools use per-user state?
Yes, by injecting user state with @ToolMemoryId.
Has the skill been security audited?
The skills.sh page lists these results: Gen Agent Trust Hub: Pass, Socket: Warn, Snyk: Pass.
What are the best langchain4j-tool-function-calling-patterns alternatives?
Popular alternatives to langchain4j-tool-function-calling-patterns include langchain4j-ai-services-patterns, developing-genkit-js and langchain4j-mcp-server-patterns. See all langchain4j-tool-function-calling-patterns alternatives











