OpenAgentIDDocumentation
API referencenpm packages@openagentid/mcp
OpenAgentIDAPI reference

@openagentid/mcp/skills

API contract shipped by @openagentid/mcp 0.1.1. Exact exports, signatures, dependencies and availability.

All packages · Runnable examples · Start an agent

ContractValue
Package@openagentid/mcp@0.1.1
Entry point@openagentid/mcp/skills
AvailabilityEarlier SDK compatibility
Reference sourcePublished TypeScript declarations
Package enginesnode >=20

Before integrating

Declares an optional peer on @openagentid/sdk ^0.1.0, which excludes SDK 0.7.2. Reference describes the published contract; do not assume compatibility with the current SDK.

This reference is generated from the integrity-verified npm archive for this exact version. Signatures describe the public contract; they are not standalone programs. Complete examples are checked separately.

Import conditions

Use the public entry point above. The package resolves it to these shipped files; do not import its internal files directly.

ConditionPublished file
types./dist/skills.d.ts
import./dist/skills.js
require./dist/skills.cjs

Exports

combineSkillsPolicies

Compose two skills policy hooks. The combined hook denies if either underlying hook denies; allow decisions from first are forwarded to second.

Signature
declare function combineSkillsPolicies(first: SkillsPolicyHook, second: SkillsPolicyHook): SkillsPolicyHook;

Source: @openagentid/mcp@0.1.1, dist/skills.d.ts:85.

createSkillsPolicy

Build a {@link SkillsPolicyHook} from a store and matching options.

The returned hook always allows tools that are not skill-like; it only consults the store when {@link CreateSkillsPolicyOptions.isSkillTool} returns true.

Signature
declare function createSkillsPolicy(options: CreateSkillsPolicyOptions): SkillsPolicyHook;

Source: @openagentid/mcp@0.1.1, dist/skills.d.ts:79.

CreateSkillsPolicyOptions

Type-only declaration; it is not a runtime value.

Signature
interface CreateSkillsPolicyOptions {
    store: SkillsPolicyStore;
    isSkillTool?: (toolName: string) => boolean;
    extractSkillName?: (args: unknown) => string | null;
    defaultDecision?: SkillsPolicyDecision;
}

Source: @openagentid/mcp@0.1.1, dist/skills.d.ts:52.

DEFAULT_SKILL_TOOL_NAMES

Tool name prefixes that the middleware treats as skill-like by default. Host applications can override the matcher entirely via {@link createSkillsPolicy}.

Signature
declare const DEFAULT_SKILL_TOOL_NAMES: ReadonlyArray<string>;

Source: @openagentid/mcp@0.1.1, dist/skills.d.ts:21.

InMemorySkillsPolicyStore

Trivial in-memory store useful in tests and as a starting point for production stores.

Signature
declare class InMemorySkillsPolicyStore implements SkillsPolicyStore {
    constructor(rules?: ReadonlyArray<SkillsRule>);
    lookup(skillName: string): SkillsRule | null;
    withRule(rule: SkillsRule): InMemorySkillsPolicyStore;
}

Source: @openagentid/mcp@0.1.1, dist/skills.d.ts:45.

SkillsPolicyDecision

Type-only declaration; it is not a runtime value.

Signature
interface SkillsPolicyDecision {
    allow: boolean;
    reason?: string;
}

Source: @openagentid/mcp@0.1.1, dist/types.d.ts:100.

SkillsPolicyHook

Hook signature for the skills policy. The hook receives the tool name, the arguments, and the verified identity, and decides whether the call should be allowed.

Type-only declaration; it is not a runtime value.

Signature
type SkillsPolicyHook = (input: {
    toolName: string;
    args: unknown;
    identity: VerifiedIdentity;
}) => Promise<SkillsPolicyDecision> | SkillsPolicyDecision;

Source: @openagentid/mcp@0.1.1, dist/types.d.ts:95.

SkillsPolicyStore

Policy store interface — implementations may be in-memory, file-backed by SKILLS.md, or fetched from a remote service.

Type-only declaration; it is not a runtime value.

Signature
interface SkillsPolicyStore {
    lookup(skillName: string): Promise<SkillsRule | null> | SkillsRule | null;
}

Source: @openagentid/mcp@0.1.1, dist/skills.d.ts:38.

SkillsRule

A single rule describing whether a (skillName, did) pair is allowed. null for dids means "any verified caller". An empty array means "no caller".

Type-only declaration; it is not a runtime value.

Signature
interface SkillsRule {
    skillName: string;
    dids: ReadonlyArray<string> | null;
    reason?: string;
}

Source: @openagentid/mcp@0.1.1, dist/skills.d.ts:27.

VerifiedIdentity

The result of running the auth pipeline against an incoming MCP request. Available to post-call hooks and audit log emitters.

Type-only declaration; it is not a runtime value.

Signature
interface VerifiedIdentity {
    did: Did;
    scopes: ReadonlyArray<string>;
    auditId: string;
    claims: Readonly<Record<string, unknown>>;
}

Source: @openagentid/mcp@0.1.1, dist/types.d.ts:47.

Supporting declarations

These package-owned declarations are referenced by the exports above. Their presence here does not make them importable from this entry point. Import only the names in Exports.

Did

A decentralized identifier following the did:oas:* method or any other DID method understood by the configured verifier.

Type-only declaration; it is not a runtime value.

Signature
type Did = string;

Source: @openagentid/mcp@0.1.1, dist/types.d.ts:17.

Package requirements

Peer dependencies

PackagePublished rangeOptional
@modelcontextprotocol/sdk^1.27.0No
@openagentid/sdk^0.1.0Yes

Archive verification

Pinned integrity:

SHA-512 integrity
sha512-Kquw9MiLgfnmX5w7RK3FK1SYKcexe5wKJk8DtlOnEaN8k/0Z+WytXkEFWwj+W4+E9ug708jwfKHFlAjdNYSUWA==

Machine-readable API manifest · Coverage

On this page