Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Agent Tool Policy Filter

agent.tool_policy_filter

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
No network

Overview

Applies only the allowlists, denylists, tag requirements, scope allowance and cost, latency or side-effect ceilings you provide. Surviving tools keep input order. The skill reads no task text, computes no relevance score, recommends nothing, does not consult Squillify entitlements, and does not authorise execution. Every reported exclusion names the exact policy rule that caused it.

Prompt assembly often needs a small, auditable policy gate before tools are shown to a model. The mechanical filter makes that step reproducible without pretending to understand which tool is relevant.

Reliability

Deterministic and input-order preserving. Every exclusion comes from one published rule; no semantic score or recommendation exists. FILTER_METADATA_INVALID means toolMetadata is empty, malformed or contains an undeclared field — correct the named entry and retry. FILTER_KEY_DUPLICATE means two entries share a key — de-duplicate the catalog and retry. FILTER_CONSTRAINTS_INVALID means a rule name or value is unsupported — correct the named constraint and retry. FILTER_LIMIT_EXCEEDED means toolMetadata exceeds 5000 entries or limit is outside 1 to 1000 — split the catalog or choose a valid limit.

Context footprint

Returns keys and compact policy reasons, never descriptive metadata. A successful call costs 1 execution credit.

When to use it

When the caller already has tool metadata and explicit admissibility rules.

When the caller needs relevance ranking, authorization or entitlement lookup.

Scope

Note
Apply explicit policy constraints to caller-supplied tool metadata.

Non-goals

  • Does not rank, score, route or recommend tools
  • Does not read task text or infer caller intent
  • Does not consult the live catalog, tenant entitlements, quota or authorization
  • Does not execute any tool

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

validation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input2 MB

How we handle your data

Sensitive input, safe output
What this means

This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response does not contain submitted content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
toolMetadataarrayYesUnique tool metadata records in caller order. The skill refuses more than 5,000 records with FILTER_LIMIT_EXCEEDED.
constraintsobjectNoClosed optional mechanical allowlist, denylist, tag, scope and ceiling policy; omit it to apply none.
limitintegerNoOutput bound; omit it for 1,000. The skill refuses a limit above 1,000 with FILTER_LIMIT_EXCEEDED.
includeExcludedbooleanNoWhether excluded decisions are returned; omit it for false.

Output schema

FieldTypeRequiredDescription
toolsarrayYesIncluded tools in caller order, 0 through the limit, each a closed key with optional category and cost.
reasonsarrayYesBounded policy decisions, 0 through the report cap, each a closed key, decision, reasonCode and optional ruleId.
summaryobjectYesClosed bounded filtering summary with candidate, included and excluded counts, applied constraints and truncation.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"agent.tool_policy_filter","input":{"toolMetadata":[{"key":"text.clean","sideEffect":"NONE"}],"constraints":{"maxSideEffect":"NONE"}}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("agent.tool_policy_filter", {"toolMetadata":[{"key":"mail.send_summary","requiredScopes":["mail:send"],"sideEffect":"EXTERNAL_WRITE"},{"key":"text.build_summary","requiredScopes":["skills:invoke"],"sideEffect":"NONE"}],"constraints":{"allowedScopes":["skills:invoke"],"maxSideEffect":"NONE"},"includeExcluded":true});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
FILTER_METADATA_INVALID400NoThe request payload failed this skill's input validation.
FILTER_KEY_DUPLICATE400NoThe request payload failed this skill's input validation.
FILTER_CONSTRAINTS_INVALID400NoThe request payload failed this skill's input validation.
FILTER_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not rank, score, route or recommend tools
  • Does not read task text or infer caller intent
  • Does not consult the live catalog, tenant entitlements, quota or authorization
  • Does not execute any tool
  • Choosing the most relevant tool for a task
  • Authorising execution
  • Discovering the tenant's entitled catalog

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "agent.tool_policy_filter",
  "input": {
    "toolMetadata": [
      {
        "key": "mail.send_summary",
        "requiredScopes": [
          "mail:send"
        ],
        "sideEffect": "EXTERNAL_WRITE"
      },
      {
        "key": "text.build_summary",
        "requiredScopes": [
          "skills:invoke"
        ],
        "sideEffect": "NONE"
      }
    ],
    "constraints": {
      "allowedScopes": [
        "skills:invoke"
      ],
      "maxSideEffect": "NONE"
    },
    "includeExcluded": true
  }
}

Examples

A scope and side-effect policy excludes the mail writer

Inputjson
{
  "toolMetadata": [
    {
      "key": "mail.send_summary",
      "requiredScopes": [
        "mail:send"
      ],
      "sideEffect": "EXTERNAL_WRITE"
    },
    {
      "key": "text.build_summary",
      "requiredScopes": [
        "skills:invoke"
      ],
      "sideEffect": "NONE"
    }
  ],
  "constraints": {
    "allowedScopes": [
      "skills:invoke"
    ],
    "maxSideEffect": "NONE"
  },
  "includeExcluded": true
}
Expected outputjson
{
  "tools": [
    {
      "key": "text.build_summary"
    }
  ],
  "summary": {
    "excludedCount": 1,
    "includedCount": 1,
    "truncated": false,
    "constraintsApplied": [
      "allowedScopes",
      "maxSideEffect"
    ],
    "candidateCount": 2
  },
  "reasons": [
    {
      "decision": "INCLUDED",
      "key": "text.build_summary",
      "reasonCode": "POLICY_ALLOWED"
    },
    {
      "decision": "EXCLUDED_BY_POLICY",
      "key": "mail.send_summary",
      "ruleId": "constraints.allowedScopes",
      "reasonCode": "SCOPE_NOT_ALLOWED"
    }
  ]
}

With no policy, tools remain in caller input order

Inputjson
{
  "toolMetadata": [
    {
      "category": "text",
      "key": "z.last"
    },
    {
      "category": "text",
      "key": "a.first"
    }
  ]
}
Expected outputjson
{
  "tools": [
    {
      "category": "text",
      "key": "z.last"
    },
    {
      "category": "text",
      "key": "a.first"
    }
  ],
  "summary": {
    "excludedCount": 0,
    "includedCount": 2,
    "truncated": false,
    "constraintsApplied": [],
    "candidateCount": 2
  },
  "reasons": [
    {
      "decision": "INCLUDED",
      "key": "z.last",
      "reasonCode": "POLICY_ALLOWED"
    },
    {
      "decision": "INCLUDED",
      "key": "a.first",
      "reasonCode": "POLICY_ALLOWED"
    }
  ]
}
  • Remove tools whose required scopes are outside an allowed set
  • Apply side-effect, latency or cost ceilings before constructing a prompt
  • Explain which explicit policy rule excluded a supplied tool

Avoid for

  • Choosing the most relevant tool for a task
  • Authorising execution
  • Discovering the tenant's entitled catalog

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

agentmetadatadiscoverypolicy