Home/Tools/@tpmjs/tools-sprites-list

spritesListTool

@tpmjs/tools-sprites-list

List all sprites in the account with their current status and metadata

Official
sandbox
v0.1.3
MIT

Interactive Playground

Test @tpmjs/tools-sprites-list (spritesListTool) 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/tools-sprites-list
pnpm add @tpmjs/tools-sprites-list
yarn add @tpmjs/tools-sprites-list
bun add @tpmjs/tools-sprites-list
deno add npm:@tpmjs/tools-sprites-list

2. Import the tool

import { spritesListTool } from '@tpmjs/tools-sprites-list';

3. Use with AI SDK

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { spritesListTool } from '@tpmjs/tools-sprites-list';

const result = await generateText({
  model: openai('gpt-4o'),
  tools: { spritesListTool },
  prompt: 'Your prompt here...',
});

console.log(result.text);

Parameters

Available configuration options

Auto-extracted

No schema available for this tool.

README

@tpmjs/sprites-list

List all sprites in your account with their current status and metadata.

Installation

npm install @tpmjs/sprites-list

Requirements

Usage

import { spritesListTool } from '@tpmjs/sprites-list';

const result = await spritesListTool.execute({});

console.log(result);
// {
//   sprites: [
//     { name: 'my-sandbox', status: 'running', createdAt: '2024-01-15T10:30:00Z' },
//     { name: 'test-env', status: 'stopped', createdAt: '2024-01-14T08:00:00Z' }
//   ],
//   count: 2
// }

Input Parameters

This tool takes no input parameters.

Output

FieldTypeDescription
spritesSprite[]Array of sprites in the account
countnumberTotal number of sprites

Sprite Object

FieldTypeDescription
namestringUnique name of the sprite
status'creating' | 'running' | 'stopped' | 'error'Current status
createdAtstringISO 8601 timestamp of creation
runtimestring?Optional runtime configuration
metadataobject?Optional custom metadata

Error Handling

The tool throws errors in these cases:

  • SPRITES_TOKEN environment variable is not set
  • Invalid or expired API token (HTTP 401)
  • Network timeout (30 second limit)
  • API errors with descriptive messages

License

MIT

Statistics

Downloads/month

0

Quality Score

0%

Bundle Size

NPM Keywords

tpmjs
sprites
sandbox
code-execution
ai

Maintainers

thomasdavis(thomasalwyndavis@gmail.com)

Frameworks

vercel-ai