@tpmjs/hello
Returns a simple 'Hello, World!' greeting with optional timestamp and customizable message
Test @tpmjs/hello (helloWorldTool) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/hellopnpm add @tpmjs/helloyarn add @tpmjs/hellobun add @tpmjs/hellodeno add npm:@tpmjs/helloimport { helloWorldTool } from '@tpmjs/hello';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { helloWorldTool } from '@tpmjs/hello';
const result = await generateText({
model: openai('gpt-4o'),
tools: { helloWorldTool },
prompt: 'Your prompt here...',
});
console.log(result.text);(includeTimestamp?: boolean) => Promise<unknown>Available configuration options
includeTimestampbooleanWhether to include the current timestamp in the greeting
Schema extracted: 2/7/2026, 4:55:05 PM
Simple example TPMJS tools for AI SDK v6 - demonstrates how to create tools that work with AI agents.
Returns a simple "Hello, World!" greeting with a timestamp.
Parameters: None
Returns:
{ "message": "Hello, World!", "timestamp": "2024-12-04T..." }
Returns a personalized greeting with the provided name.
Parameters:
name (string, required): The name of the person to greetReturns:
{ "message": "Hello, John!", "timestamp": "2024-12-04T..." }
import { streamText } from 'ai'; import { openai } from '@ai-sdk/openai'; import { helloWorldTool, helloNameTool } from '@tpmjs/hello'; const result = streamText({ model: openai('gpt-4o-mini'), messages: [{ role: 'user', content: 'Say hello to Alice' }], tools: { helloWorld: helloWorldTool, helloName: helloNameTool, }, });
This package serves as a template for creating your own TPMJS tools. Key requirements:
ai@6.0.0-beta.124)description, parameters, and execute"tpmjs": { "category": "text-analysis", "description": "Your tool description" }
tpmjs keyword in package.json# Build pnpm build # Type check pnpm type-check # Watch mode pnpm dev
Downloads/month
47
GitHub Stars
0
Quality Score