Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    toolscope capability installer

    1

    Install a mechanical, one-time capability gate for Python agent tools to prevent replays and unauthorized access.

    $15

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    toolscope capability installer

    toolscope capability installer

    Example session with this skill installed

    I need to make sure my Python agent can't call the 'delete_record' tool more than once per approval and can only delete the specific ID I authorize. Install the ToolScope gate.

    • Read your context and instructions
    • Compiled the toolscope capability installer

    I have installed the ToolScope capability gate. I verified core.py (digest b2ebcb1a...) and test_core.py (digest 3cec8a3d...). The implementation uses a local SQLite store for replay prevention and HMAC-SHA256 for token integrity.

    ToolScope Security Audit & Integration

    ComponentStatusImplementation Details
    Core ModuleVerifiedSHA-256 match confirmed; all 6 tests passed.
    Tool: delete_recordINSTALLEDBound to subject (session-user) and resource (record_id).
    Replay StoreConfiguredLocated at /var/lib/agent/toolscope.db (0600 permissions).
    Choke PointActiveWired into AgentHost.dispatch(); no direct tool imports found.
    
    # tools/gate.py - Verified Choke Point Implementation
    import json
    from .core import for_session
    
    # Strict resource encoding for delete_record
    def encode_delete_resource(record_id: str):
        if not record_id.isalnum():
            raise ValueError("Invalid record_id")
        return json.dumps([record_id], ensure_ascii=True)
    
    # The agent only receives this callable
    execute_tool = for_session(
        issuer=trusted_issuer,
        store=sqlite_store,
        subject=current_session.user_id
    )
    

    Next steps

    1. Run pytest tests/test_toolscope_wiring.py to confirm the 12 negative test cases pass.
    2. Ensure the TOOL_SCOPE_KEY is injected via a secure secret manager, not an environment variable visible to the agent.
    3. Set a cron job to prune the replay store using the unix timestamp logic: consumed < now - 3600.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Agents that can call tools freely pose a significant security risk. If an agent can replay an old approval, act on the wrong resource, or mint its own permissions, your system is vulnerable. This skill installs a mechanical, model-independent enforcement layer for Python hosts that stops unauthorized or repeated tool execution.

    What it does

    • Replay prevention ensures every tool authorization is consumed exactly once via a local SQLite store.
    • HMAC authentication signs tool calls with a shared secret to prevent the agent from tampering with permissions.
    • Strict binding ties every call to a specific subject, tool name, and resource ID.
    • Expiration handling enforces short-lived TTLs for all issued capabilities.
    • Choke point enforcement routes all tool execution through a single, verifiable dispatch path.

    How it works

    1. Scope and Verify the Python environment and run SHA-256 digest checks on the core crypto module.
    2. Install Core by copying the verified 64-line MIT ToolScope core into your codebase.
    3. Wire Dispatch by creating a session-aware choke point that the agent cannot bypass or introspect.
    4. Test and Validate using a suite of 12 tests that verify replay protection, subject mismatch, and expiry.

    Frameworks & tools

    This skill is for Python 3.11+ environments. It uses the Python standard library (hmac, hashlib, sqlite3) to maintain a zero-dependency security footprint.

    Why this beats prompting it yourself

    Prompt-level instructions are suggestions that models can ignore or route around. This skill installs a hard technical barrier in the host code that the agent cannot see, edit, or influence, ensuring that even a compromised model cannot execute unauthorized actions.

    Use cases

    • Preventing an agent from reusing a single-use refund approval on multiple transactions.
    • Restricting a database agent to reading only one specific record per authorized request.
    • Adding expiring capability tokens to high-risk tools like file deletion or email sending.
    • Hardening an agent host after an incident where the model acted outside its intended scope.

    Known limitations

    Does not provide sandboxing or OS-level security. The agent must not have write access to the signing key or the SQLite replay database. Only supports Python hosts.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.

    Requires Python 3.11+. The host must protect the signing key and SQLite store from agent access. Does not support cross-host replay protection without a shared database.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    Software
    Tool Permission Scoper MCPPython

    Permissions

    No special permissions declared or detected

    Listed1 month ago

    What's inside

    Frequently Asked Questions

    It installs a small standard-library capability check in your Python agent host. Each tool call needs an HMAC-signed, expiring capability bound to one subject, one tool and one resource, and each capability can be used once, so an approval cannot be replayed or reused on a different record. It only covers calls routed through the single dispatch point it installs, and it does not make an agent's other code paths safe. Anything it could not route is listed as uncovered.

    The ToolScope core is built using only the Python standard library (sqlite3, hmac, hashlib), ensuring you don't have to manage external dependencies or bloat your environment. It is compatible with any Python 3.11+ application regardless of the specific LLM or orchestration framework you use.

    Not through the model's text alone, because enforcement runs in your host code rather than in a prompt. But it only holds if the agent cannot reach the signing key or the code that issues capabilities, cannot write the replay database, and cannot call tools around the dispatch point. The skill checks for these, and lists any path it could not close as uncovered, so treat that list as part of the result.

    The skill instructions, the MIT-licensed ToolScope core (core.py) with its 6 tests, a license file, and a guide covering the core's exact behavior, replay-store operating rules and a wiring skeleton with 12 tests for you to add to your own suite. There is no installer script: your agent installs the core, checks its digest, and wires your issue and dispatch points by following the skill.

    The SQLite store is used exclusively as a local 'nonce' tracker to ensure that once a specific capability token is used, it can never be replayed. This happens entirely within your infrastructure; no data is sent to external servers or the LLM provider.

    New in APIs & Backend