venice_list_characters
Retrieve available AI character personas for roleplay interactions from Venice AI's collection.
Instructions
List available Venice AI character personas for roleplay
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of characters to return (default: 20) |
Implementation Reference
- src/tools/discovery/index.ts:31-41 (handler)Executes the tool logic: fetches characters from Venice API /characters endpoint, handles errors, limits the list, truncates descriptions, and returns a formatted text response.async ({ limit }) => { const response = await veniceAPI("/characters"); const data = await response.json() as CharactersResponse; if (!response.ok) return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] }; const chars = (data.data || []).slice(0, limit); const list = chars.map((c) => { const desc = c.description ? c.description.substring(0, 100) + (c.description.length > 100 ? "..." : "") : ""; return `- ${c.name} (${c.slug}): ${desc}`; }).join("\n"); return { content: [{ type: "text" as const, text: `Available characters (showing ${chars.length}):\n${list}\n\nNote: Use the slug to interact with a specific character.` }] }; }
- src/tools/discovery/index.ts:28-30 (schema)Zod schema for the tool's input parameters, defining an optional 'limit' number.{ limit: z.number().optional().default(20).describe("Maximum number of characters to return (default: 20)") },
- src/tools/discovery/index.ts:25-42 (registration)Registers the venice_list_characters tool on the MCP server using server.tool(), providing name, description, input schema, and handler function.server.tool( "venice_list_characters", "List available Venice AI character personas for roleplay", { limit: z.number().optional().default(20).describe("Maximum number of characters to return (default: 20)") }, async ({ limit }) => { const response = await veniceAPI("/characters"); const data = await response.json() as CharactersResponse; if (!response.ok) return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] }; const chars = (data.data || []).slice(0, limit); const list = chars.map((c) => { const desc = c.description ? c.description.substring(0, 100) + (c.description.length > 100 ? "..." : "") : ""; return `- ${c.name} (${c.slug}): ${desc}`; }).join("\n"); return { content: [{ type: "text" as const, text: `Available characters (showing ${chars.length}):\n${list}\n\nNote: Use the slug to interact with a specific character.` }] }; } );
- src/index.ts:17-17 (registration)Top-level call to register discovery tools, including venice_list_characters, on the MCP server.registerDiscoveryTools(server);