Skip to main content
Glama

get_collection_content

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

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

  • Registers the collection tools including 'get_collection_content' by calling getCollectionTools on the server instance.
    // Register collection tools this.toolRegistry.registerMany(getCollectionTools(instance));
  • Tool handler registration for 'get_collection_content': defines schema, description, and delegates execution 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) },
  • Zod schema definition for get_collection_content input arguments (path: string).
    export const GetCollectionContentArgsSchema = z.object({ path: z.string().describe("Path to the content file in the collection repository") });
  • Helper class method implementing the core getCollectionContent logic: fetches file from GitHub API, decodes base64, sanitizes content, securely parses YAML frontmatter, validates metadata, and returns structured 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/mcp-server'

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