pinelabs-mcp-tool-gen-2f8cca — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited pinelabs-mcp-tool-gen-2f8cca (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Generate complete MCP tool implementations from Pine Labs API documentation, curl commands, or request/response examples.
The user may provide any of:
If the tool name is not provided or cannot be inferred, ask the user before proceeding.
- [ ] Step 1: Parse input and extract API contract
- [ ] Step 2: Determine tool name and resource file
- [ ] Step 3: Implement tool function
- [ ] Step 4: Register tool in tools.py
- [ ] Step 5: Add Pydantic models (if needed)
- [ ] Step 6: Write unit tests
- [ ] Step 7: Run linter — fix errors
- [ ] Step 8: Run tests — fix errorsExtract: HTTP method, endpoint path, required/optional parameters with types, and example response.
Map parameters:
str → validate_resource_id() or raw string paramint / float → typed parameterdict → Pydantic modellist → typed list parameterbool → boolean parameterNaming conventions:
get_{resource} or get_{resource}_by_{field}get_{resources} or list_{resources}create_{resource}update_{resource}delete_{resource} or cancel_{resource}Place in pkg/pinelabs/{resource_type}.py. Create new file only if needed.
import json
import logging
from fastmcp import FastMCP
from pkg.pinelabs.client import PineLabsClient, PineLabsAPIError
from pkg.pinelabs.utils.errors import (
api_error_response,
validation_error_response,
unexpected_error_response,
)
from pkg.pinelabs.utils.validators import validate_resource_id
logger = logging.getLogger("pinelabs-mcp-server.{resource}")
def register_{resource}_tools(
mcp: FastMCP, client: PineLabsClient
) -> None:
@mcp.tool(
name="tool_name",
description=(
"Action verb + what it does. "
"When to use / prerequisites. "
"Constraints or return format."
),
)
async def tool_name(required_param: str) -> str:
rid = validate_resource_id(required_param, "param_name")
try:
result = await client.get(f"/path/{rid}")
return json.dumps(result, indent=2)
except PineLabsAPIError as e:
return api_error_response(
e.message, e.code, e.status_code
)
except Exception as e:
return unexpected_error_response(e, "context")In pkg/pinelabs/tools.py:
register_{resource}_toolsToolset with add_read_tools() / add_write_tools()group via group.add_toolset()register_{resource}_tools(mcp, client) at the bottomCreate pkg/pinelabs/models/{resource}.py with Pydantic v2 models.
Create tests/test_{resource}_tool.py:
import json
from unittest.mock import AsyncMock
import pytest
from pkg.pinelabs.client import PineLabsAPIError
from pkg.pinelabs.{resource} import register_{resource}_tools
@pytest.fixture
def tool(fake_mcp, mock_client):
register_{resource}_tools(fake_mcp, mock_client)
return fake_mcp.tools["tool_name"]
class TestToolName:
@pytest.mark.asyncio
async def test_success(self, tool, mock_client):
mock_client.get.return_value = {"id": "123", "status": "ACTIVE"}
result = await tool(required_param="123")
data = json.loads(result)
assert data["id"] == "123"
mock_client.get.assert_called_once()
@pytest.mark.asyncio
async def test_validation_error(self, tool, mock_client):
result = await tool(required_param="")
data = json.loads(result)
assert data["code"] == "VALIDATION_ERROR"
@pytest.mark.asyncio
async def test_api_error(self, tool, mock_client):
mock_client.get.side_effect = PineLabsAPIError(
404, "NOT_FOUND", "Resource not found"
)
result = await tool(required_param="valid-id")
data = json.loads(result)
assert data["code"] == "NOT_FOUND"
assert data["status_code"] == 404
@pytest.mark.asyncio
async def test_unexpected_error(self, tool, mock_client):
mock_client.get.side_effect = RuntimeError("boom")
result = await tool(required_param="valid-id")
data = json.loads(result)
assert data["code"] == "INTERNAL_ERROR"make lint # fix any issues
make test # all tests must passpkg/pinelabs/{resource}.pypkg/pinelabs/tools.pypkg/pinelabs/models/{resource}.py (if needed)tests/test_{resource}_tool.py (success + validation + API error + unexpected)make lint)make test)~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.