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)The async handler function that fetches characters from the Venice API endpoint '/characters', processes the response by slicing to the requested limit, truncates descriptions to 100 chars, formats a markdown list, and returns it as text content.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 defining the optional 'limit' parameter for the number of characters to list.{ 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 inline handler implementation.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.` }] }; } );