# Use Claude as your team's assistant

**You will:** Let Claude review the pending questions of your agents, look up the answer in your knowledge and give you a reply ready to paste.

**You need:**
- A Lelemon login
- Claude on the web, on the desktop or in Claude Code

When an agent does not know what to answer, it leaves a [question for the team](/guides/approvals#let-the-agent-ask-your-team). Claude can work that queue with you: it reads each question with the conversation behind it, searches the knowledge you loaded and writes the answer. You read the draft and paste it. With the permissions below Claude only reads, so nothing reaches the customer unless a person sends it.

## Connect Claude

The URL is the same in every client:

```text
https://api.lelemon.cl/mcp
```

- **claude.ai and Claude Desktop:** open Settings, Connectors, add a custom connector and paste the URL. Claude opens the Lelemon sign-in.
- **Claude Code:** run `claude mcp add --transport http lelemon https://api.lelemon.cl/mcp`, type `/mcp`, choose `lelemon` and authenticate.

Sign in with your Lelemon account, choose the organization and mark the permissions below. There is no API key to copy. [MCP server](/tools/mcp) explains how the connection is secured and how to remove it.

## Permissions to mark

Mark only these. Together they let Claude read, and none lets it change anything.

| Permission | What Claude can do with it |
| --- | --- |
| `team-questions:read` | List the questions agents left for the team and read each one |
| `conversations:read` | Read the last lines of the conversation with the customer |
| `cases:read` | Read the data of the case, such as the plan or the order |
| `knowledge:read` | Search the knowledge collections |

To let Claude send the answer itself, also mark `team-questions:write`, which belongs to owners and admins. Without it Claude only drafts, which is the safer way to start. See [API keys](/guides/api-keys) for the full list of permissions.

## Ask for the work

Once connected, write what you want in your own words:

> Review the pending questions of the agents. For each one, search our knowledge and give me the answer ready to paste.

Claude lists the open questions, reads each one with its conversation, searches the knowledge with the words of the question and answers with the passage it found and the document it comes from. If nothing in the knowledge answers it, it says so instead of guessing.

## What Claude reads

Behind the request Claude calls three tools, all read only:

| Tool | Route | Use |
| --- | --- | --- |
| `teamQuestions.list` | `GET /v2/team-questions` | The queue: `status=open` keeps what waits for an answer |
| `teamQuestions.context` | `GET /v2/team-questions/{id}/context` | One question with the last lines of the conversation and the data of the case |
| `knowledgeCollections.search` | `POST /v2/knowledge-collections/search` | The passages of your documents that answer a question |

### The context of a question

```bash title="cURL"
curl https://api.lelemon.cl/v2/team-questions/tqn_5RvP2aKq9XwLmN3tYbZc01/context \
  -H "Authorization: Bearer $LELEMON_API_KEY"
```

```ts title="Node.js"
import { Lelemon } from '@lelemon-ai/sdk';

const lelemon = new Lelemon({ apiKey: process.env.LELEMON_API_KEY });
const context = await lelemon.teamQuestions.context('tqn_5RvP2aKq9XwLmN3tYbZc01');
console.log(context.question, context.messages, context.data);
```

```json title="MCP"
{
  "tool": "teamQuestions.context",
  "arguments": { "id": "tqn_5RvP2aKq9XwLmN3tYbZc01" }
}
```


It answers the question, what the agent was trying to do, the last ten lines of the conversation (oldest first, internal notes left out) and the non-sensitive data of the case. **Every sensitive value is covered**: a field marked sensitive in the pipeline never shows its value, and the same value written inside the question or the conversation is replaced by `[dato oculto]`. `hiddenFields` names the fields that were covered, so Claude knows the data exists without seeing it. Reading the context needs `team-questions:read`, `conversations:read` and `cases:read`.

**TeamQuestionContext**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | enum | yes | `team_question_context` |
| `id` | string | yes |  |
| `status` | enum | yes | `open`, `answered`, `delivered`, `discarded` |
| `caseId` | string | yes |  |
| `contactName` | string or null | yes |  |
| `pipelineName` | string or null | yes |  |
| `question` | string | yes | The question, with every sensitive value covered. |
| `context` | string or null | yes |  |
| `answer` | string or null | yes |  |
| `createdAt` | string | yes |  |
| `messages` | TeamQuestionMessage[] | yes | The last lines of the conversation with the customer, oldest first. Internal notes are left out. |
| `data` | TeamQuestionCaseField[] | yes | The data of the case that is not sensitive, with the name of each field. |
| `hiddenFields` | string[] | yes | Names of the fields that hold sensitive values. Their values never appear here. |

### Search the knowledge

```bash title="cURL"
curl https://api.lelemon.cl/v2/knowledge-collections/search \
  -H "Authorization: Bearer $LELEMON_API_KEY" \
  --json '{ "query": "What is the return policy?", "limit": 5 }'
```

```ts title="Node.js"
const result = await lelemon.knowledgeCollections.search({
  query: 'What is the return policy?',
  limit: 5,
});
for (const passage of result.data) {
  console.log(passage.collectionName, passage.documentName, passage.score, passage.text);
}
```

```json title="MCP"
{
  "tool": "knowledgeCollections.search",
  "arguments": { "body": { "query": "What is the return policy?", "limit": 5 } }
}
```


It is the search your agents use: by meaning and by exact words, so a product code is found too. Each passage says which collection and document it comes from. Send `collectionIds` to search only some collections. `score` goes from 0 to 1 and is `null` when the passage was found only by its exact words. `limit` is up to 10 passages and defaults to 5. An empty `data` means nothing in the knowledge answers it. It needs `knowledge:read`.

**KnowledgePassage**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | enum | yes | `knowledge_passage` |
| `collectionId` | string | yes |  |
| `collectionName` | string | yes |  |
| `documentId` | string | yes |  |
| `documentName` | string | yes |  |
| `sourceUrl` | string or null | yes | Where the document came from, when it has an address. |
| `text` | string | yes | The passage of the document. |
| `score` | number or null | yes | How close the passage is in meaning, from 0 to 1. It is null when the passage was found only by its exact words. |

## Good practice

- Start without `team-questions:write`: read the draft, then paste it where your team answers.
- Ask Claude to quote the document of each passage, so you can check the source.
- Keep the knowledge current. Claude answers with what the collections say, and with nothing else.
- Remove the connection from **Developers** in the dashboard when you stop using it.

## What's next

- [Approve agent actions and answer the team](/guides/approvals) to answer a question by API.
- [Knowledge](/guides/knowledge) to load the documents Claude searches.
- [MCP server](/tools/mcp) for the other tools Claude can use.
