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

spritesGetTool

@tpmjs/tools-sprites-get

Retrieve details of a specific sprite by name including status and configuration. Use this to check if a sprite exists and get its current state.

Official
sandbox
v0.1.2
MIT

Interactive Playground

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

2. Import the tool

import { spritesGetTool } from '@tpmjs/tools-sprites-get';

3. Use with AI SDK

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

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

console.log(result.text);

Parameters

Available configuration options

Auto-extracted
name
Required
Type: string

Name of the sprite to retrieve

Schema extracted: 1/16/2026, 3:45:37 AM

README

@tpmjs/sprites-get

Retrieve details of a specific sprite by name including status and configuration.

Installation

npm install @tpmjs/sprites-get

Requirements

Usage

import { spritesGetTool } from '@tpmjs/sprites-get';

const result = await spritesGetTool.execute({
  name: 'my-sandbox'
});

console.log(result);
// {
//   name: 'my-sandbox',
//   status: 'running',
//   createdAt: '2024-01-15T10:30:00Z',
//   runtime: 'node:20'
// }

Input Parameters

ParameterTypeRequiredDescription
namestringYesName of the sprite to retrieve

Output

FieldTypeDescription
namestringName 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
  • Sprite not found (HTTP 404)
  • 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