Current collected state Current
Observed since 20 Oct, 19:18 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
enhance tooling for AI agents
Automatically generate schemas from LLM function calling.
Instead of writing schemas by hand 🥱
import { OpenAI } from "openai";
const openai = new OpenAI();
const tools = [{
"type": "function",
"function": {
"name": "getWeather",
"description": "Get current temperature for a given location.",
"parameters": {
"type": "object",
"properties": {
// life is too short for schema
},
},
}
}];
function getWeather(args: { location: string }) {
return //...
}
const completion = await openai.chat.completions.create({
model: "gpt-5",
messages: [{ role: "user", content: "What is the weather like in Paris today?" }],
tools,
});
Let the compiler works for you
import { fn } from "2schema";
const openai = new OpenAI();
class Tools {
@fn
static async getWeather(args: { location: string }) {
return; // ...
}
}
// will generate the schema for you
const tools = [Tools.getWeather.toJSONSchema()];
const completion = await openai.chat.completions.create({
model: "gpt-5",
messages: [
{ role: "user", content: "What is the weather like in Paris today?" },
],
tools,
});
Download counts and popularity will appear here as the collector receives them.
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 19:18 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:28c3fd728a0f6c786aa413ac6cf154c07c015f327f0f7f3946275f6600835112