different-ai/openwork · error
${result.message}
Error message
${result.message} What it means
The marketplace capability tool runner in capability-registry.ts calls executeMarketplaceSource to run a marketplace capability; when the result is not ok, it throws toolError(result.message), surfacing the underlying marketplace failure as the tool's error message. The registry merely propagates the source-level failure to the MCP tool caller.
Source
Thrown at ee/apps/den-api/src/mcp/capability-registry.ts:641
.map((reference) => [`${reference.pluginId}:${reference.configObjectId}`, reference]))
return [...uniqueReferences.values()].map((reference) => {
const capabilityName = `plugin:${reference.pluginId}:${reference.configObjectId}`
const parsed: Extract<ParsedCapability, { kind: "marketplace" }> = {
kind: "marketplace",
name: capabilityName,
pluginId: reference.pluginId,
configObjectId: reference.configObjectId,
}
return contentLeaf({
namespace: "marketplace",
toolName: capabilityName,
capabilityName,
description: `Retrieve marketplace capability ${capabilityName}`,
readOnly: true,
authority: "den",
run: async (args) => {
const result = await executeMarketplaceSource(ctx, parsed, { name: capabilityName, body: args })
if (!result.ok) throw toolError(result.message)
const content = result.result.content ?? result.result.source ?? result.result.definition
return typeof content === "string" ? content : JSON.stringify(result.result)
},
})
})
},
execute: async (ctx, parsed, input) => {
if (!parsedForKind(parsed, "marketplace")) return unknownCapabilityResult(input.name)
const result = await executeMarketplaceSource(ctx, parsed, input)
if (!result.ok) {
return result.error === "unknown_capability"
? unknownCapabilityResult(input.name)
: marketplaceCapabilityErrorToolResult(result)
}
return {
content: textContent(JSON.stringify(result.result, null, 2)),
structuredContent: result.result,
}View on GitHub (pinned to 2b7df46e8a)
Solutions
- Read the embedded result.message for the actual marketplace failure and fix it accordingly.
- Re-fetch/refresh the marketplace capability list so the registry stops exposing stale capability names.
- Verify the capability still exists and is published to the org's marketplace.
- Check marketplace service health and the caller's permissions if the message indicates authz or backend failure.
Defensive patterns
Strategy: try-catch
Validate before calling
const listing = await getMarketplaceCapabilities(ctx)
if (!listing.some((c) => c.name === capabilityName)) {
throw new Error(`capability ${capabilityName} not found in marketplace`)
} Type guard
function isSourceFailure<T>(r: { ok: boolean; message: string } & T): r is { ok: false; message: string } {
return r.ok === false
} Try / catch
try {
result = await executeMarketplaceSource(ctx, parsed, { name: capabilityName, body: args })
} catch (error) {
// toolError already embeds result.message; refresh registry and retry once on stale-capability errors
await refreshMarketplaceRegistry()
throw error
} Prevention
- Refresh the capability registry after marketplace publish/unpublish events.
- Validate capability names against a fresh listing before invoking.
- Confirm org permissions for the marketplace capability.
- Check marketplace backend health on repeated failures.
When it happens
Trigger: Invoking a generated marketplace capability tool (retrieve marketplace capability <name>) where executeMarketplaceSource returns { ok: false } — e.g. the capability is missing from the marketplace, the execution request fails validation, or the upstream marketplace service errors.
Common situations: Capability unpublished or renamed after the registry snapshot was built; malformed args failing the marketplace's validation; marketplace backend outage or permission denial for the org; stale registry cache referencing removed capabilities.
Related errors
- ${toolResultError(result)}
- MCP_TOOL_REPORTED_ERROR
- MCP_TOOL_EXECUTION
- Failed to run MCP tool (${response.status}).
- MCP_PROVIDER_INVALID_PARAMS|MCP_PROVIDER_HTTP_403|MCP_PROVIDER_HTTP_429
AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01).
Data as JSON: /api/errors/3d52056fc65cf27b.
Report an issue: GitHub.