Skip to main content
Glama

get_collection_content

Retrieve detailed information about AI personas and behavioral profiles from the DollhouseMCP collection to understand and activate specific AI customization elements.

Instructions

Get detailed information about content from the collection. Use this when users ask to 'see details about a persona' or 'show me the creative writer persona'. Personas are a type of content that defines AI behavioral profiles.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe collection path to the AI customization element. Format: 'library/[type]/[element].md' where type is personas, skills, templates, agents, or memories. Example: 'library/skills/code-review.md'.

Implementation Reference

  • Registration of the get_collection_content tool including name, description, JSON input schema, and handler function that delegates to server.getCollectionContent(path)
    tool: { name: "get_collection_content", description: "Get detailed information about content from the collection. Use this when users ask to 'see details about a persona' or 'show me the creative writer persona'. Personas are a type of content that defines AI behavioral profiles.", inputSchema: { type: "object", properties: { path: { type: "string", description: "The collection path to the AI customization element. Format: 'library/[type]/[element].md' where type is personas, skills, templates, agents, or memories. Example: 'library/skills/code-review.md'.", }, }, required: ["path"], }, }, handler: (args: any) => server.getCollectionContent(args.path) },
  • Final MCP tool registry registration for all collection tools, including get_collection_content
    this.toolRegistry.registerMany(getCollectionTools(instance));
  • Zod validation schema for get_collection_content input arguments
    export const GetCollectionContentArgsSchema = z.object({ path: z.string().describe("Path to the content file in the collection repository") });
  • Core handler logic for retrieving collection content: fetches from GitHub API (DollhouseMCP/collection), base64 decodes, sanitizes, securely parses YAML frontmatter, validates metadata, returns metadata and content
    async getCollectionContent(path: string): Promise<{ metadata: PersonaMetadata; content: string }> { const url = `${this.baseUrl}/${path}`; const data = await this.githubClient.fetchFromGitHub(url); if (data.type !== 'file') { throw new Error('Path does not point to a file'); } // Decode Base64 content const content = Buffer.from(data.content, 'base64').toString('utf-8'); // Sanitize content for display (this is view-only, not installation) const sanitizedContent = ContentValidator.sanitizePersonaContent(content); // Use secure YAML parser let parsed; try { parsed = SecureYamlParser.safeMatter(sanitizedContent); } catch (error) { if (error instanceof SecurityError) { throw new Error(`Security warning: This content contains potentially malicious content - ${error.message}`); } throw error; } const metadata = parsed.data as PersonaMetadata; // Additional validation for display const metadataValidation = ContentValidator.validateMetadata(metadata); if (!metadataValidation.isValid && metadataValidation.severity === 'critical') { throw new Error(`Security warning: This content contains potentially malicious content`); } return { metadata, content: parsed.content }; }

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/DollhouseMCP/DollhouseMCP'

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