Home/Tools/@tpmjs/hello

helloWorldTool

@tpmjs/hello

Returns a simple 'Hello, World!' greeting with optional timestamp and customizable message

Official
text-analysis
v0.0.3

Interactive Playground

Test @tpmjs/hello (helloWorldTool) with AI-powered execution

0/2000 characters

Installation & Usage

Install this tool and use it with the AI SDK

1. Install the package

npm install @tpmjs/hello
pnpm add @tpmjs/hello
yarn add @tpmjs/hello
bun add @tpmjs/hello
deno add npm:@tpmjs/hello

2. Import the tool

import { helloWorldTool } from '@tpmjs/hello';

3. Use with AI SDK

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);

Signature

(includeTimestamp?: boolean) => Promise<unknown>

Tags

ai-sdk
customizable
example
greeting
hello
message
optional
simple
text-analysis
timestamp
tpmjs
world

Parameters

Available configuration options

Auto-extracted
includeTimestamp
Optional
Type: boolean

Whether to include the current timestamp in the greeting

Schema extracted: 2/7/2026, 4:55:05 PM

README

@tpmjs/hello

Simple example TPMJS tools for AI SDK v6 - demonstrates how to create tools that work with AI agents.

Tools

helloWorldTool

Returns a simple "Hello, World!" greeting with a timestamp.

Parameters: None

Returns:

{
  "message": "Hello, World!",
  "timestamp": "2024-12-04T..."
}

helloNameTool

Returns a personalized greeting with the provided name.

Parameters:

  • name (string, required): The name of the person to greet

Returns:

{
  "message": "Hello, John!",
  "timestamp": "2024-12-04T..."
}

Usage

With AI SDK v6

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,
  },
});

Template for Creating TPMJS Tools

This package serves as a template for creating your own TPMJS tools. Key requirements:

  1. Use AI SDK v6 Beta (ai@6.0.0-beta.124)
  2. Use Zod 4 for parameter validation
  3. Export tool objects with description, parameters, and execute
  4. Add TPMJS metadata to package.json:
    "tpmjs": {
      "category": "text-analysis",
      "description": "Your tool description"
    }
  5. Include the tpmjs keyword in package.json

Development

# Build
pnpm build

# Type check
pnpm type-check

# Watch mode
pnpm dev

Statistics

Downloads/month

47

GitHub Stars

0

Quality Score

78%

Bundle Size

NPM Keywords

tpmjs
ai-sdk
hello
example

Maintainers

thomasdavis(thomasalwyndavis@gmail.com)

Frameworks

vercel-ai