# pattern_consensus

Use when the agent wants the cross-project CONSENSUS — 'how do most current Next.js projects actually do X?' — rather than a single example. Returns precomputed consensus records ('X% of projects matching predicate P do Y') for a category: auth-library (which auth library projects use), data-fetching-style (legacy page-level data fetching vs Server Actions vs Server Components), or routing-hooks (modern next/navigation vs legacy next/router). Each record carries its honest denominator N, the full outcome distribution with percentages, and the exact SQL predicate behind every number. Pass category to filter, or omit it to get all. Next.js corpus — pass language='ts'.

Agent View of the PolicyLayer registry record for `pattern_consensus`. HTML page: https://policylayer.com/tools/dev-codeitall-codeitall/pattern-consensus

## Facts

- Tool: `pattern_consensus`
- Server: Codeitall (`https://api.codeitall.dev/mcp`) — https://policylayer.com/tools/dev-codeitall-codeitall.md
- Homepage: https://github.com/codeitalldev/codeitall
- Risk category: Read (Low risk)
- Registry record: grade B, identity unverified
- Server rate-limited: no
- Parameters: 2
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `category` | string | no |  |
| `language` | string | no |  |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "pattern_consensus",
    "arguments": {}
  }
}
```

## Why pattern_consensus is rated Low

This tool retrieves and queries data about cross-project consensus patterns (auth libraries, data-fetching styles, routing hooks) without side effects. It is a read-only lookup/reporting function that returns precomputed statistics. No code execution, data modification, deletion, or financial operations are involved. The tool's purpose is informational analysis of existing project patterns.

From the tool's own definition: "Tool description states it 'Returns precomputed consensus records' and retrieves statistical data about how projects implement patterns."

## Use case

AI agents call pattern_consensus to retrieve information from Codeitall without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Codeitall:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "pattern_consensus": {}
  }
}
```

## Other tools on Codeitall (7)

- `answer_api_question` — Read — https://policylayer.com/tools/dev-codeitall-codeitall/answer-api-question.md
- `behavior_lookup` — Read — https://policylayer.com/tools/dev-codeitall-codeitall/behavior-lookup.md
- `compare_implementations` — Read — https://policylayer.com/tools/dev-codeitall-codeitall/compare-implementations.md
- `find_modern_equivalent` — Read — https://policylayer.com/tools/dev-codeitall-codeitall/find-modern-equivalent.md
- `list_families` — Read — https://policylayer.com/tools/dev-codeitall-codeitall/list-families.md
- `package_trust` — Read — https://policylayer.com/tools/dev-codeitall-codeitall/package-trust.md
- `signature_search` — Read — https://policylayer.com/tools/dev-codeitall-codeitall/signature-search.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=dev-codeitall-codeitall · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/dev-codeitall-codeitall
