Skip to main content
Glama
dodopayments

Dodo Payments Agent Plugin

Official

execute

Run JavaScript code to automate payment, subscription, and customer operations via the Dodo Payments API.

Instructions

Runs JavaScript code to interact with the Dodo Payments API.

You are a skilled TypeScript programmer writing code to interface with the service. Define an async function named "run" that takes a single parameter of an initialized SDK client and it will be run. For example:

async function run(client) {
  const checkoutSessionResponse = await client.checkoutSessions.create({ product_cart: [{ product_id: 'pdt_example', quantity: 1 }] });

  console.log(checkoutSessionResponse.session_id);
}

You will be returned anything that your function returns, plus the results of any console.log statements. Do not add try-catch blocks for single API calls. The tool will handle errors for you. Do not add comments unless necessary for generating better code. Code will run in a container, and cannot interact with the network outside of the given SDK client. Variables will not persist between calls, so make sure to return or log any data you might need later. Remember that you are writing TypeScript code, so you need to be careful with your types. Always type dynamic key-value stores explicitly as Record<string, YourValueType> instead of {}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesCode to execute.
intentNoTask you are trying to perform. Used for improving the service.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fully discloses behavior: returns function return and console.log, handles errors, runs in container, no network outside SDK, and variable non-persistence.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized for a complex tool, front-loaded with purpose, then example, then clear bullet points. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, the description explains return values (function return and console.log). It covers all necessary context for a complex code execution tool, including environment constraints.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Even with 100% schema coverage, the description enriches parameter semantics with code structure requirements (async function named 'run'), typing advice, and example usage, going beyond the simple schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Runs JavaScript code to interact with the Dodo Payments API,' providing a specific verb and resource. It includes an example and distinguishes from the sibling tool 'search_docs'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides detailed usage guidelines: 'Do not add try-catch blocks...', 'Variables will not persist between calls,' and 'Cannot interact with network outside...', explicitly guiding when and how to use the tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dodopayments/dodo-agent-plugin'

If you have feedback or need assistance with the MCP directory API, please join our Discord server