---
title: user_agent | CodeWeaver Docs
description: API reference for codeweaver.server.mcp.user_agent
url: "https://docs.knitli.com/api/server/mcp/user_agent"
type: static
generatedAt: "2026-04-17T17:21:09.893Z"
---

# user_agent
       [Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fuser_agent%2F.%20I%20want%20to%20ask%20questions%20about%20it.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fuser_agent%2F.%20I%20want%20to%20ask%20questions%20about%20it.)[View in Markdown](/codeweaver/api/server/mcp/user_agent.md)       [Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fuser_agent%2F)[Share on X](https://x.com/intent/tweet?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fuser_agent%2F&text=user_agent)[Share on Threads](https://threads.net/intent/post?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fuser_agent%2F&text=user_agent)[Share on Bluesky](https://bsky.app/intent/compose?text=user_agent%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fuser_agent%2F)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fuser_agent%2F)[Share on Reddit](https://reddit.com/submit?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fuser_agent%2F&title=user_agent)[Share on Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fuser_agent%2F&t=user_agent)[Share on Email](mailto:?subject=user_agent&body=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fuser_agent%2F)[Share on WhatsApp](https://wa.me/?text=user_agent%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fuser_agent%2F)[Share on Telegram](https://t.me/share/url?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmcp%2Fuser_agent%2F&text=user_agent)
# `codeweaver.server.mcp.user_agent`
[Section titled “codeweaver.server.mcp.user_agent”](#codeweaverservermcpuser_agent)
Tools, Resources, and Prompts exposed to users and Users’ Agents. Currently there’s only one: `find_code` and we don’t plan to change that soon.

## Function: `find_code_tool`
[Section titled “Function: find_code_tool”](#function-find_code_tool)

**

```
find_code_tool()
```

CodeWeaver’s `find_code` tool is an advanced code search function that leverages context and task-aware semantic search to identify and retrieve relevant code snippets from a codebase using natural language queries. `find_code` uses advanced sparse and dense embedding models, and reranking models to provide the best possible results. It is purpose-built for AI coding agents to assist with code understanding, implementation, debugging, optimization, testing, configuration, and documentation tasks.

To use it, provide a natural language query describing what you are looking for. You can optionally specify an intent to help narrow down the search results. You can also set a token limit to control the size of the response, and filter results by programming language.

Args: query: Natural language search query intent: Optional search intent. One of `understand`, `implement`, `debug`, `optimize`, `test`, `configure`, `document` token_limit: Maximum tokens to return (default: 30000) focus_languages: Optional language filter context: MCP context for request tracking if available

Returns: FindCodeResponseSummary with ranked matches and metadata

Raises: QueryError: If search fails unexpectedly