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
      };
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It mentions 'detailed information' but doesn't specify format, permissions, or potential side effects. For a read operation with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

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

Conciseness4/5

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

The description is appropriately sized with two sentences that each add value. The first states the purpose, the second provides usage examples. No wasted words, though it could be slightly more front-loaded with the core purpose.

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

Completeness3/5

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

For a single-parameter read tool with good schema coverage but no annotations or output schema, the description is adequate but incomplete. It covers purpose and usage but lacks details about return format, error conditions, or behavioral constraints that would help an agent use it effectively.

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

Parameters3/5

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

The schema has 100% description coverage, providing format details and examples for the 'path' parameter. The description adds context by mentioning 'personas' as a type of content, but doesn't provide additional semantic meaning beyond what's already in the schema. Baseline 3 is appropriate when schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the tool's purpose as 'Get detailed information about content from the collection' with specific examples for personas. It distinguishes from siblings like 'get_element_details' by focusing on collection content rather than general elements, though it could be more explicit about the distinction.

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

Usage Guidelines4/5

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

The description provides clear usage context with examples ('when users ask to see details about a persona'), but it doesn't explicitly mention when NOT to use it or name specific alternatives like 'get_element_details' or 'browse_collection' from the sibling list.

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

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