---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://sourcecraft.dev/portal/docs/en/code-assistant/operations/agent/typing-your-requests.md
  - https://sourcecraft.dev/portal/docs/ru/code-assistant/operations/agent/typing-your-requests.md
title: Inputting a request in SourceCraft Code Assistant
description: How to effectively formulate requests for SourceCraft Code Assistant in natural language to get better results.
---
> **Documentation Index:** Fetch the complete configuration index at https://sourcecraft.dev/portal/docs/en/llms.txt


# Inputting a request in SourceCraft Code Assistant

<!-- source: en/_includes/code-assistant/only-in-vscode.md -->
{% note warning %}

This feature is only available in Visual Studio Code.

{% endnote %}
<!-- endsource: en/_includes/code-assistant/only-in-vscode.md -->

Code Assistant is designed to understand natural language. You do not have to use any special commands or syntax to communicate with it. Simply enter your request in any language as if you were talking to a developer.

## Effective request strategies {#strategies}

Put clearly what you want Code Assistant to do. Avoid vague or ambiguous phrasing.

| Strategy | Implementation |
| --- | --- |
| **Be specific** | Write: `Fix the calculateTotal error which returns incorrect results` instead of: `Fix my code`. |
| **Provide context** | Use [context mentions](context-mentions.md) `@` for links to files and code. |
| **Break tasks down** | Split complex tasks into smaller, manageable steps. |
| **Include examples** | Provide code examples if you need a specific format or style. |

## Query examples {#examples}

```text
create a new file named `utils.py` and add a function named `add` that takes two numbers as arguments and returns their sum value
```

```text
in @src/components/Button.tsx, change the button color to blue
```

```text
find all instances of the `oldValue` variable in @/src/App.js and replace them with `newValue`
```

```text
run the `npm install` command in the terminal
```

```text
explain the `calculateTotal` function in @/src/utils.ts
```

```text
@problems fix all detected issues
```

## Common mistakes to avoid {#common-mistakes}

| Bad | Good |
| --- | --- |
| Vague requests | Specify exactly what needs to be done. |
| Assuming context | Explicitly state files and functions. |
| Excessive technical jargon | Use clear, straightforward language. |
| Multiple unrelated tasks | Send one focused request at a time. |
| Continuing without confirmation | Check the code to make sure it is complete. |