# behavior_lookup

Use when the agent has a specific (crate, fn_name) pair and wants to know what inputs it actually accepts at runtime — e.g. (crate='jiff', fn_name='Timestamp::from_str') for methods, (crate='ascii85', fn_name='decode') for free functions. fn_name accepts BOTH qualified (Type::method / module::fn) and bare (method / fn) forms — the matcher tries the exact input first, then the alternate form; the matched_fn_name response field records the substitution when one happened. Returns the probe observation table verbatim from the substrate: each row is (input, outcome=ok|err|panic, value or error variant). Pass an optional inputs array to filter to specific input strings. On a zero-hit the response carries a diagnostics block (received_crate, received_fn_name, closest_crates, closest_fns_in_crate, hint) so the agent can self-correct without a dead-end round-trip. The substrate's discrimination findings live here — runtime behaviour the docs are silent or wrong about.

Agent View of the PolicyLayer registry record for `behavior_lookup`. HTML page: https://policylayer.com/tools/dev-codeitall-codeitall/behavior-lookup

## Facts

- Tool: `behavior_lookup`
- 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: 3 (2 required)
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `crate` | string | yes |  |
| `inputs` | array | no |  |
| `fn_name` | string | yes |  |

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": "behavior_lookup",
    "arguments": {
      "crate": "<crate>",
      "fn_name": "<fn_name>"
    }
  }
}
```

## Why behavior_lookup is rated Low

behavior_lookup is a read-only tool that retrieves and reports observed runtime behavior data for Rust crate APIs. It performs lookups and returns observation tables without side effects, state changes, or code execution. This is a pure information retrieval operation, fitting the Read category.

From the tool's own definition: "Tool description states it 'wants to know what inputs it actually accepts at runtime' and 'Returns the probe observation table verbatim from the substrate' — these are query operations that retrieve runtime behavior data without modifying or executing…"

## Use case

AI agents call behavior_lookup 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": {
    "behavior_lookup": {}
  }
}
```

## Other tools on Codeitall (7)

- `answer_api_question` — Read — https://policylayer.com/tools/dev-codeitall-codeitall/answer-api-question.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
- `pattern_consensus` — Read — https://policylayer.com/tools/dev-codeitall-codeitall/pattern-consensus.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
