Skip to main content
Glama

install_collection_content

Download AI customization elements like personas, skills, templates, agents, or memories from the DollhouseMCP collection to your local portfolio for immediate use.

Instructions

Install AI customization elements FROM the DollhouseMCP collection TO your local portfolio. Use this when users ask to download/install any element type (personas, skills, templates, agents, or memories) from the collection. Examples: 'install the creative writer persona from the collection', 'get the code review skill from collection', 'download the meeting notes template from collection', 'get the project context memory from collection'.

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

  • The installContent method called by the server handler to install element from collection path. Delegates to installFromCollection for core logic.
    async installContent(inputPath: string): Promise<{
      success: boolean;
      message: string;
      metadata?: IElementMetadata;
      elementType?: ElementType;
      filename?: string;
    }> {
      return await this.installFromCollection(inputPath);
    }
  • Core handler logic for installing from collection: validates path, fetches content from GitHub API, sanitizes and validates content, performs atomic file write to local portfolio.
    private async installFromCollection(collectionPath: string): Promise<InstallResult> {
      // ENHANCEMENT (PR #1453): Log collection installation attempt
      logger.debug('Installing from collection', {
        collectionPath
      });
    
      // SECURITY: Validate and sanitize the input path first
      const sanitizedPath = validatePath(collectionPath);
      const elementType = this.validateAndExtractElementType(sanitizedPath);
    
      // STEP 1: FETCH CONTENT INTO MEMORY (NO DISK OPERATIONS YET)
      const content = await this.fetchCollectionContent(sanitizedPath);
    
      // STEP 2: PERFORM ALL VALIDATION BEFORE ANY DISK OPERATIONS
      const { sanitizedContent, metadata } = await this.validateCollectionContent(content);
    
      // STEP 3: PREPARE FILE PATH AND CHECK EXISTENCE
      // FIX (SonarCloud L704): Remove unused elementDir variable
      const { filename, localPath } = this.prepareFilePath(sanitizedPath, elementType);
    
      // SECURITY: Check if file already exists before any write operations
      const existsResult = await this.checkFileExists(localPath, filename);
      if (existsResult) {
        logger.debug('Element already exists in collection', {
          filename,
          elementType
        });
        return existsResult;
      }
    
      // STEP 4: ALL VALIDATION COMPLETE - NOW PERFORM ATOMIC WRITE OPERATION
      await this.atomicWriteFile(localPath, sanitizedContent);
    
      // ENHANCEMENT (PR #1453): Log successful installation
      logger.debug('Element installed successfully from collection', {
        elementName: metadata.name,
        elementType,
        filename,
        localPath
      });
    
      return {
        success: true,
        message: `AI customization element installed successfully!`,
        metadata,
        filename,
        elementType
      };
    }
  • Input schema validation for the tool: requires 'path' parameter with collection path format.
    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"],
    },
  • Tool definition and registration in getCollectionTools: includes name, description, schema, and handler that delegates to server.installContent.
      tool: {
        name: "install_collection_content",
        description: "Install AI customization elements FROM the DollhouseMCP collection TO your local portfolio. Use this when users ask to download/install any element type (personas, skills, templates, agents, or memories) from the collection. Examples: 'install the creative writer persona from the collection', 'get the code review skill from collection', 'download the meeting notes template from collection', 'get the project context memory from collection'.",
        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.installContent(args.path)
    },
  • Registers all collection tools including install_collection_content via ToolRegistry.registerMany(getCollectionTools(instance)).
    // Register collection tools
    this.toolRegistry.registerMany(getCollectionTools(instance));
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the tool's purpose (installation from collection to portfolio) and element types, but lacks details on behavioral traits like whether installation overwrites existing elements, requires authentication, has rate limits, or what happens on success/failure. It provides basic context but misses operational specifics needed for a mutation tool.

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

Conciseness5/5

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

The description is efficiently structured: first sentence states the purpose, second provides usage guidelines with examples. Every sentence adds value—no redundancy or fluff. It's front-loaded with the core action and appropriately sized for a single-parameter tool.

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 mutation tool with no annotations and no output schema, the description adequately covers purpose and usage but lacks completeness in behavioral context (e.g., side effects, error handling) and output details. It compensates somewhat with examples, but given the tool's complexity (installing elements), more operational transparency would be beneficial.

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 'path' parameter's format and example. The description adds no parameter-specific semantics beyond implying the path corresponds to element types (personas, skills, etc.), which is already covered in the schema's description. This meets the baseline for high schema coverage.

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

Purpose5/5

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

The description clearly states the specific action ('Install AI customization elements FROM the DollhouseMCP collection TO your local portfolio') and resource ('personas, skills, templates, agents, or memories'), distinguishing it from siblings like 'browse_collection' or 'get_collection_content' which don't involve installation. It explicitly identifies the source (collection) and destination (portfolio) with a directional flow.

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

Usage Guidelines5/5

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

The description provides explicit usage guidance: 'Use this when users ask to download/install any element type... from the collection' and lists concrete examples (e.g., 'install the creative writer persona'). It clearly distinguishes this from alternatives like 'browse_collection' (for exploration) or 'get_collection_content' (for viewing without installation).

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