Skip to main content
Glama
omar320250068-prog

opencode-skill-hub

install_skill_or_agent

Install a skill as SKILL.md or register an MCP server in opencode.json to add capabilities to an OpenCode workspace.

Instructions

Install a skill or register an MCP server into an OpenCode workspace. For itemType='skill' this writes ${workspacePath}/.opencode/skills//SKILL.md, downloading it from sourceUrl or generating a documented boilerplate when sourceUrl is omitted. For itemType='mcp-server' this merges mcpConfig into ${workspacePath}/opencode.json under mcp., creating the file when needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesIdentifier for the skill directory or the mcp config key. Letters, digits, dots, underscores and dashes only.
itemTypeYesWhat to install.
mcpConfigNoMCP server entry to merge into opencode.json, e.g. {"type":"local","command":["npx","-y","my-server"],"enabled":true}. Omit to receive a placeholder entry.
sourceUrlNoOptional http(s) URL of a SKILL.md to download. GitHub blob/API URLs are automatically converted to raw URLs. Omit to generate a boilerplate skill.
workspacePathYesAbsolute path (or path relative to the home directory) of the target project.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does so well: it names the exact files written, the merge target path (mcp.<name> in opencode.json), file creation behavior, URL downloading with GitHub blob-to-raw conversion, and boilerplate/placeholder generation when optional inputs are omitted. It omits overwrite/failure/reversibility semantics and result reporting, which keeps it short of a 5.

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?

Two dense sentences, purpose front-loaded before the mode-specific details, and no filler. It is information-heavy but every clause earns its place.

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 write tool with no annotations and no output schema, the description covers the write targets and fallbacks thoroughly but says nothing about what is returned, whether an existing SKILL.md is overwritten, or how merge conflicts on mcp.<name> are resolved. Those gaps are the ones an agent would most want filled.

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

Parameters4/5

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

Schema coverage is already 100%, so the baseline is 3; the description earns extra credit by explaining how parameters interact across modes — sourceUrl and mcpConfig matter only for their respective itemType, and omitting each triggers a documented fallback. That is meaning beyond the per-field schema text.

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 opens with a specific verb and resource ('Install a skill or register an MCP server') into a named target ('an OpenCode workspace'), and then splits the two modes explicitly. This lets an agent distinguish it immediately from siblings like search_skills_and_agents (discovery) and analyze_project_needs (analysis).

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 two itemType branches imply when each mode applies, and the sourceUrl/mcpConfig fallbacks hint at usage, but there is no explicit statement of when to choose this tool over the sibling search/discovery tools. Usage is inferable rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.