Home/Tools/@tpmjs/tools-vercel

getUsage

@tpmjs/tools-vercel

Get billing usage and consumption data (requests, bandwidth, invocations) for a date range.

Official
ops
v0.2.0
MIT

Interactive Playground

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

2. Import the tool

import { getUsage } from '@tpmjs/tools-vercel';

3. Use with AI SDK

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { getUsage } from '@tpmjs/tools-vercel';

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

console.log(result.text);

Signature

(to: string, from: string, teamId?: string) => Promise<unknown>

Tags

agent
bandwidth
billing
consumption
data
date
deployment
hosting
invocations
ops
range
requests
tpmjs
usage
vercel

Parameters

Available configuration options

Auto-extracted
from
Required
Type: string

Start date in ISO 8601 UTC format (e.g., "2025-01-01T00:00:00.000Z"). Inclusive.

to
Required
Type: string

End date in ISO 8601 UTC format (e.g., "2025-02-01T00:00:00.000Z"). Exclusive.

teamId
Optional
Type: string

Team ID for team-scoped requests.

Schema extracted: 3/1/2026, 4:26:03 AM

README

@tpmjs/tools-vercel

Vercel API tools for AI agents. Manage deployments, projects, domains, environment variables, and build logs.

Installation

npm install @tpmjs/tools-vercel

Setup

Set your Vercel API token:

export VERCEL_TOKEN="..."

Usage

import { listDeployments, getProject, listEnvVars } from '@tpmjs/tools-vercel';

const deployments = await listDeployments.execute({ projectId: 'my-project', limit: 5 });
const project = await getProject.execute({ idOrName: 'my-project' });
const envVars = await listEnvVars.execute({ idOrName: 'my-project' });

Tools

ToolDescription
listDeploymentsList deployments with optional state filtering
getDeploymentGet details of a specific deployment
cancelDeploymentCancel a building deployment
listProjectsList all projects in your account
getProjectGet details of a specific project
listDomainsList all domains in your account
getDomainGet details of a specific domain
listProjectDomainsList domains assigned to a project
listEnvVarsList environment variables for a project
createEnvVarCreate a new environment variable
deleteEnvVarDelete an environment variable
getDeploymentEventsGet build logs and events for a deployment

License

MIT

Statistics

Downloads/month

198

GitHub Stars

9

Quality Score

89%

Bundle Size

NPM Keywords

tpmjs
vercel
deployment
hosting
agent

Maintainers

thomasdavis(thomasalwyndavis@gmail.com)

Frameworks

vercel-ai