Skip to main content
Glama
DollhouseMCP

DollhouseMCP

Official

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
      };
    }
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 only states it 'gets detailed information' without specifying what details are returned, format, error conditions, or performance characteristics. It mentions personas as a type but doesn't fully describe behavior.

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 concise with two sentences that are front-loaded with the main purpose. The persona example is helpful, though the second sentence could be slightly more streamlined.

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

Completeness2/5

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

For a tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'detailed information' includes, return format, or error handling. Given the complexity implied by the path format and sibling tools, more context is needed.

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?

Schema description coverage is 100%, so the schema fully documents the single 'path' parameter. The description adds context about personas as content type but doesn't provide additional parameter semantics beyond what's in the schema.

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 getting detailed information about content from a collection, with specific examples for personas. It distinguishes from siblings like 'get_element_details' by focusing on collection paths, but 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 Guidelines3/5

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

The description provides one specific usage scenario (when users ask about personas) and implies this is for viewing details, but doesn't explicitly state when NOT to use it or compare with alternatives like 'get_element_details' or 'browse_collection'.

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/mcp-server'

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