Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt

Use this file to discover all available pages before exploring further.

Discover tools on demand instead of loading hundreds into context.
  1. Discovercapabilities_discover with a task description
  2. Installcapability_details with tool names (map to your model’s function-calling format)
  3. Invoketools/call on the server path
Both discovery tools live on /pinkfish-sidekick. For full parameter schemas, see the Pinkfish Workflow Building server reference.

End-to-End Example

const MCP_URL = "https://mcp.app.pinkfish.ai";
const TOKEN = "<YOUR_PLATFORM_JWT>";

const headers = {
  Authorization: `Bearer ${TOKEN}`,
  "Content-Type": "application/json",
  Accept: "application/json",
};

async function callTool(serverPath, toolName, args) {
  const resp = await fetch(`${MCP_URL}${serverPath}`, {
    method: "POST",
    headers,
    body: JSON.stringify({
      jsonrpc: "2.0",
      method: "tools/call",
      params: { name: toolName, arguments: args },
      id: 1,
    }),
  });
  const result = await resp.json();
  if (result.error) throw new Error(result.error.message);
  return result.result;
}

function parseResult(r) {
  if (r?.structuredContent) return r.structuredContent;
  return JSON.parse(r?.content?.[0]?.text ?? "{}");
}

async function discover(task) {
  const r = await callTool("/pinkfish-sidekick", "capabilities_discover", { request: task });
  return parseResult(r);
}

async function getDetails(items) {
  const r = await callTool("/pinkfish-sidekick", "capability_details", { items });
  return parseResult(r);
}

// 1. Discover
const capabilities = await discover("search the web for AI news");
const topTool = capabilities.tools?.[0];
if (!topTool) throw new Error("No tools found");

// 2. Install (optional — get schema when you need parameter details)
const details = await getDetails([topTool.name]);

// 3. Invoke
const result = await callTool(`/${topTool.serverName}`, topTool.name, {
  query: "latest AI news 2026",
});
console.log(parseResult(result));
Node.js 18+ or browser. Python: requests.post() with same JSON-RPC payload.

capabilities_discover

Describe the task; get matching tools and connections.
curl -s -X POST "https://mcp.app.pinkfish.ai/pinkfish-sidekick" \
  -H "Authorization: Bearer $PINKFISH_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "capabilities_discover",
      "arguments": {
        "request": "search my gmail for unread emails"
      }
    },
    "id": 1
  }'
Parameters:
ParameterRequiredDescription
requestYesNatural language description of the task
typesNoFilter results: ["tool"], ["connection"], ["resource"], ["agentSkill"], or combinations
contextNo"workflow-creation" or "agent-execution" — filters available skills
Response:
{
  "tools": [
    {
      "name": "gmail_search_emails",
      "serverName": "gmail",
      "hasSkill": false,
      "confidence": 0.95
    }
  ],
  "connections": [
    {
      "name": "My Gmail",
      "id": "abc123-pcid",
      "application": "gmail",
      "confidence": 0.95
    }
  ],
  "resources": [],
  "skills": []
}
FieldUse
tools[].nameTool name for tools/call
tools[].serverNameServer path (e.g. gmail/gmail)
connections[].idPCID for application tools

capability_details

Pass tool names; get full parameter schemas.
curl -s -X POST "https://mcp.app.pinkfish.ai/pinkfish-sidekick" \
  -H "Authorization: Bearer $PINKFISH_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "capability_details",
      "arguments": {
        "items": ["gmail_search_emails"]
      }
    },
    "id": 1
  }'
Parameters:
ParameterRequiredDescription
itemsYesTool names from discovery (use tools[].name, not serverName)
typesNoFilter: ["tool"], ["connection"], ["resource"], ["agentSkill"]

Key Points

  • Embedded tools: no PCID required. Application tools: use PCID from discovery or see Connecting to MCPs.
  • Pass tool.name to capability_details, not serverName.
  • Install only what the user needs (typically 1–5 tools per task).

Custom Agents

Bootstrap with these two discovery tools. On user task: discover → fetch schemas → map to your model’s function-calling format → add to agent context. Route model tool calls through tools/call.

Code Execution Shortcut

Code Execution chains tools without installing them. Discover tools, then pass tool calls into a single code-execution_execute invocation.