Skip to main content
Glama
lyupro
by lyupro

Configure SkillForge

skills__configure

Add or remove skill folders, manage blacklist, or reset configuration to default values.

Instructions

Manage configured skill folders, blacklist, and reset to defaults. Mutates persisted config under defaultConfigPath().

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes
folderNo
blacklistNo

Implementation Reference

  • Main handler function for the skills__configure tool. Handles six actions: add_folder, remove_folder, list_folders, set_blacklist, get_blacklist, reset. Mutates persisted config and reconciles folders in-place on deps.folders.
    export async function handleConfigure(
      deps: ServerDeps,
      args: { action: ConfigureAction; folder?: string; blacklist?: string[] },
    ): Promise<ConfigureResult> {
      const { action } = args;
    
      try {
        if (action === 'list_folders') {
          const persisted = await deps.configStore.load();
          return {
            folders: [...deps.folders],
            blacklist: persisted.blacklist,
            totalSkills: deps.registry.size,
          };
        }
    
        if (action === 'get_blacklist') {
          const persisted = await deps.configStore.load();
          return {
            folders: [...deps.folders],
            blacklist: persisted.blacklist,
            totalSkills: deps.registry.size,
          };
        }
    
        if (action === 'add_folder') {
          if (args.folder === undefined) {
            throw new Error(`configure: action "add_folder" requires "folder"`);
          }
          if (args.folder.trim().length === 0) {
            throw new Error('configure: folder path must not be empty');
          }
          const absPath = resolve(args.folder);
          const persisted = await deps.configStore.load();
          const alreadyPresent = persisted.folders.some((f) => resolve(f.path) === absPath);
          if (!alreadyPresent) {
            persisted.folders.push({ path: absPath, priority: 100, enabled: true, tags: [] });
          }
          // Why: always save even on no-op — simpler than branching, atomic write is cheap.
          await deps.configStore.save(persisted);
          const finalPersisted = await reconcileFolders(deps);
          return {
            folders: [...deps.folders],
            blacklist: finalPersisted.blacklist,
            totalSkills: deps.registry.size,
          };
        }
    
        if (action === 'remove_folder') {
          if (args.folder === undefined) {
            throw new Error(`configure: action "remove_folder" requires "folder"`);
          }
          const absPath = resolve(args.folder);
          const persisted = await deps.configStore.load();
          persisted.folders = persisted.folders.filter((f) => resolve(f.path) !== absPath);
          await deps.configStore.save(persisted);
          const finalPersisted = await reconcileFolders(deps);
          return {
            folders: [...deps.folders],
            blacklist: finalPersisted.blacklist,
            totalSkills: deps.registry.size,
          };
        }
    
        if (action === 'set_blacklist') {
          if (args.blacklist === undefined) {
            throw new Error(`configure: action "set_blacklist" requires "blacklist"`);
          }
          const persisted = await deps.configStore.load();
          persisted.blacklist = args.blacklist;
          await deps.configStore.save(persisted);
          const finalPersisted = await reconcileFolders(deps);
          return {
            folders: [...deps.folders],
            blacklist: finalPersisted.blacklist,
            totalSkills: deps.registry.size,
          };
        }
    
        if (action === 'reset') {
          const fresh = defaultConfig();
          await deps.configStore.save(fresh);
          const finalPersisted = await reconcileFolders(deps);
          return {
            folders: [...deps.folders],
            blacklist: finalPersisted.blacklist,
            totalSkills: deps.registry.size,
          };
        }
    
        throw new Error(`configure: unknown action "${action as string}"`);
      } catch (err) {
        const msg = err instanceof Error ? err.message : String(err);
        // Avoid double-prefixing if error already has the action prefix.
        if (msg.startsWith(`configure(${action}):`) || msg.startsWith('configure: ')) {
          throw err;
        }
        throw new Error(`configure(${action}): ${msg}`);
      }
    }
  • Input schema for skills__configure using Zod. Defines action enum (add_folder, remove_folder, list_folders, set_blacklist, get_blacklist, reset) with optional folder string and optional blacklist string array.
    export const configureInputSchema = {
      action: z.enum([
        'add_folder',
        'remove_folder',
        'list_folders',
        'set_blacklist',
        'get_blacklist',
        'reset',
      ]),
      folder: z.string().optional(),
      blacklist: z.array(z.string()).optional(),
    } as const;
  • Reconciles folders by loading persisted config, resolving env+persisted config, splicing folders in-place on deps.folders, setting blacklist, invalidating cache, updating folder watcher, and ensuring registry freshness.
    async function reconcileFolders(deps: ServerDeps): Promise<PersistedConfig> {
      const persisted = await deps.configStore.load();
      const resolved = await loadResolvedConfig(process.env, deps.configStore);
      // Splice in-place so all references to deps.folders see the new list.
      deps.folders.splice(0, deps.folders.length, ...resolved.folders);
      deps.blacklistFilter.setManualBlacklist(persisted.blacklist);
      deps.metadataCache.invalidate();
      try {
        await deps.folderWatcher.setFolders(deps.folders);
      } catch (err) {
        console.error(`[skillforge:configure] watcher setFolders failed: ${String(err)}`);
      }
      await ensureRegistryFresh(deps);
      return persisted;
    }
  • ConfigureResult type defining the return shape: folders (resolved paths), blacklist (manual blacklist), and totalSkills (registry size after action).
    export interface ConfigureResult {
      /** Currently active resolved folders (post-action). */
      folders: string[];
      /** Currently active manual blacklist (post-action). */
      blacklist: string[];
      /** Skills visible in the registry after the action took effect. */
      totalSkills: number;
    }
Behavior3/5

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

The description explicitly states that the tool mutates persisted config under defaultConfigPath(), which is a key behavioral disclosure. However, it does not elaborate on side effects, reversibility, or error conditions, partially informing the agent.

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 concise with two sentences that efficiently convey the core purpose and key behavioral trait. No unnecessary words or fluff.

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?

Given no output schema, no annotations, and 0% schema parameter coverage, the description is too brief. It fails to explain the action enum values or how parameters interact, leaving the agent with insufficient context to use the tool correctly.

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

Parameters2/5

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

With 0% schema description coverage and no elaboration in the description, the parameter semantics are underdefined. The description mentions 'folders' and 'blacklist' but does not map them to schema parameters or explain their usage.

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 it manages configured skill folders, blacklist, and reset to defaults, which distinguishes it from sibling tools like skills__get or skills__invoke. It uses specific verbs and resources.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, nor does it explain the context for different actions. It merely states what it does without usage context.

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/lyupro/skillforge-mcp'

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