# semantic_search_code

A read tool on the CogniRepo MCP server.

Agent View of the PolicyLayer registry record for `semantic_search_code`. HTML page: https://policylayer.com/tools/ashlesh-t-cognirepo/semantic-search-code

## Facts

- Tool: `semantic_search_code`
- Server: CogniRepo (`pypi:cognirepo`) — https://policylayer.com/tools/ashlesh-t-cognirepo.md
- Install: `npx -y pypi:cognirepo`
- Homepage: https://github.com/ashlesh-t/cognirepo
- Risk category: Read (Low risk)
- Registry record: grade A, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Allowed

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

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

## Why semantic_search_code is rated Low

The tool performs semantic searching over code, which retrieves information without modifying data or triggering external side effects. It integrates with the knowledge graph for retrieval only. No execution, writing, deletion, or financial activity is implied. Confidence is moderate due to lack of explicit description, but the name and peer tools strongly suggest read-only behavior.

From the tool's own definition: "Tool name 'semantic_search_code' combined with context of a persistent memory/knowledge graph server indicates a search/query operation."

## Use case

AI agents call semantic_search_code to retrieve information from CogniRepo 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 CogniRepo:

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

## Other tools on CogniRepo (33)

- `supersede_learning` — Other — https://policylayer.com/tools/ashlesh-t-cognirepo/supersede-learning.md
- `architecture_overview` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/architecture-overview.md
- `context_pack` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/context-pack.md
- `cross_repo_search` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/cross-repo-search.md
- `cross_repo_traverse` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/cross-repo-traverse.md
- `dependency_graph` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/dependency-graph.md
- `episodic_search` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/episodic-search.md
- `explain_change` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/explain-change.md
- `find_symbol_path` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/find-symbol-path.md
- `get_agent_bootstrap` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/get-agent-bootstrap.md
- `get_error_patterns` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/get-error-patterns.md
- `get_last_context` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/get-last-context.md
- `get_service_endpoints` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/get-service-endpoints.md
- `get_session_brief` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/get-session-brief.md
- `get_session_history` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/get-session-history.md
- `get_user_profile` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/get-user-profile.md
- `graph_stats` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/graph-stats.md
- `list_org_context` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/list-org-context.md
- `lookup_symbol` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/lookup-symbol.md
- `org_dependencies` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/org-dependencies.md
- `org_search` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/org-search.md
- `org_wide_search` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/org-wide-search.md
- `retrieve_memory` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/retrieve-memory.md
- `search_docs` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/search-docs.md
- `search_token` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/search-token.md
- `subgraph` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/subgraph.md
- `who_calls` — Read — https://policylayer.com/tools/ashlesh-t-cognirepo/who-calls.md
- `link_repos` — Write — https://policylayer.com/tools/ashlesh-t-cognirepo/link-repos.md
- `log_episode` — Write — https://policylayer.com/tools/ashlesh-t-cognirepo/log-episode.md
- `record_decision` — Write — https://policylayer.com/tools/ashlesh-t-cognirepo/record-decision.md
- …and 3 more: https://policylayer.com/tools/ashlesh-t-cognirepo.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=ashlesh-t-cognirepo · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/ashlesh-t-cognirepo
