Skip to content

Conversation

@amotl
Copy link
Member

@amotl amotl commented Jul 19, 2025

About

Instructions about how to use provided MCP tools have been missing dearly. @hammerhead and @WalBeh contributed a few. Thanks!

Details

I've stacked different kinds of guidelines on top of each other. Future iterations might remix and bring them into shape further. Please add any of your thoughts for improvements to the review comments.

What's inside

Preview

uv tool install --upgrade 'cratedb-mcp @ git+https://github.com/crate/cratedb-mcp.git@instructions'

References

Backlog

@coderabbitai
Copy link

coderabbitai bot commented Jul 19, 2025

"""

Walkthrough

This update introduces an instructions.md file containing detailed system prompt instructions for the MCP server. The server is now initialized with these instructions, which are loaded at runtime and combined with general instructions. The package configuration is updated to ensure the Markdown file is included in distributions. A test verifies the presence of key instruction sections.

Changes

File(s) Change Summary
cratedb_mcp/instructions.md Added a comprehensive instructions file outlining MCP tool usage and assistant behavior.
cratedb_mcp/main.py Modified to load and pass instructions.md content plus general instructions to FastMCP on startup; reordered tool registrations.
pyproject.toml Updated dependency to a newer version and included Markdown files as package data for cratedb_mcp.
CHANGES.md Changelog updated to reflect the addition of system prompt instructions to the MCP server.
tests/test_instructions.py Added test verifying the presence of key instruction sections in the combined instructions text.
cratedb_mcp/tool.py Moved get_cluster_health() function to the bottom of the file without changing implementation.

Sequence Diagram(s)

sequenceDiagram
    participant MainScript as __main__.py
    participant Resources as importlib.resources
    participant FastMCP as FastMCP
    participant InstructionsFile as instructions.md
    participant InstructionsGeneral as GeneralInstructions

    MainScript->>Resources: Load instructions.md text
    Resources-->>MainScript: Return instructions text
    MainScript->>InstructionsGeneral: Retrieve general instructions text
    InstructionsGeneral-->>MainScript: Return general instructions text
    MainScript->>FastMCP: Initialize(name, instructions_mcp + instructions_general)
    FastMCP-->>MainScript: Application ready with combined instructions
Loading

Estimated code review effort

2 (~20 minutes)

Possibly related PRs

Suggested reviewers

  • WalBeh
  • kneth
  • surister

Poem

🐇 In code’s green meadow, a new guide appears,
With markdown and wisdom to calm all our fears.
FastMCP listens, instructions in tow,
To fetch, query, and help us all grow.
Hop along, friends, the path’s now more bright,
With tools and with knowledge, we leap to new height! 🌿✨
🥕🐰
"""


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0d1b65c and 43e449f.

📒 Files selected for processing (2)
  • cratedb_mcp/instructions.md (1 hunks)
  • tests/test_instructions.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/test_instructions.py
  • cratedb_mcp/instructions.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: oci
  • GitHub Check: oci
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch instructions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
cratedb_mcp/instructions.md (1)

23-23: Minor style improvement: simplify "return back" to "return".

As flagged by the static analysis tool, "return back" is redundant - "return" alone is clearer and more concise.

-Your task is to translate questions into SQL queries, run them on CrateDB, and return back results.
+Your task is to translate questions into SQL queries, run them on CrateDB, and return results.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9901015 and 90e4882.

📒 Files selected for processing (4)
  • CHANGES.md (1 hunks)
  • cratedb_mcp/__main__.py (2 hunks)
  • cratedb_mcp/instructions.md (1 hunks)
  • pyproject.toml (1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: amotl
PR: crate/cratedb-mcp#0
File: :0-0
Timestamp: 2025-05-17T14:55:23.400Z
Learning: In the cratedb-mcp repository, the `backlog.md` document is intended as a functional planning document that doesn't need to adhere to strict formatting standards. Avoid pointing out formatting or layout shortcomings in this file during reviews.
Learnt from: amotl
PR: crate/cratedb-mcp#17
File: CHANGES.md:5-5
Timestamp: 2025-05-16T13:35:04.487Z
Learning: For the cratedb-mcp repository, version numbers and release dates in CHANGES.md are updated by a dedicated "Release vX.Y.Z" commit as part of the release process, not during documentation preparation PRs.
CHANGES.md (3)
Learnt from: amotl
PR: crate/cratedb-mcp#17
File: CHANGES.md:5-5
Timestamp: 2025-05-16T13:35:04.487Z
Learning: For the cratedb-mcp repository, version numbers and release dates in CHANGES.md are updated by a dedicated "Release vX.Y.Z" commit as part of the release process, not during documentation preparation PRs.
Learnt from: amotl
PR: crate/cratedb-mcp#0
File: :0-0
Timestamp: 2025-05-17T14:55:23.400Z
Learning: In the cratedb-mcp repository, the `backlog.md` document is intended as a functional planning document that doesn't need to adhere to strict formatting standards. Avoid pointing out formatting or layout shortcomings in this file during reviews.
Learnt from: amotl
PR: crate/cratedb-mcp#24
File: pyproject.toml:76-76
Timestamp: 2025-05-17T16:02:09.342Z
Learning: For the cratedb-mcp project, FastMCP pre-2.0 releases provide the same API surface needed by the application, so a lower bound on the FastMCP dependency is not necessary.
pyproject.toml (3)
Learnt from: amotl
PR: crate/cratedb-mcp#17
File: CHANGES.md:5-5
Timestamp: 2025-05-16T13:35:04.487Z
Learning: For the cratedb-mcp repository, version numbers and release dates in CHANGES.md are updated by a dedicated "Release vX.Y.Z" commit as part of the release process, not during documentation preparation PRs.
Learnt from: amotl
PR: crate/cratedb-mcp#0
File: :0-0
Timestamp: 2025-05-17T14:55:23.400Z
Learning: In the cratedb-mcp repository, the `backlog.md` document is intended as a functional planning document that doesn't need to adhere to strict formatting standards. Avoid pointing out formatting or layout shortcomings in this file during reviews.
Learnt from: amotl
PR: crate/cratedb-mcp#24
File: pyproject.toml:76-76
Timestamp: 2025-05-17T16:02:09.342Z
Learning: For the cratedb-mcp project, FastMCP pre-2.0 releases provide the same API surface needed by the application, so a lower bound on the FastMCP dependency is not necessary.
cratedb_mcp/__main__.py (3)
Learnt from: amotl
PR: crate/cratedb-mcp#24
File: pyproject.toml:76-76
Timestamp: 2025-05-17T16:02:09.342Z
Learning: For the cratedb-mcp project, FastMCP pre-2.0 releases provide the same API surface needed by the application, so a lower bound on the FastMCP dependency is not necessary.
Learnt from: amotl
PR: crate/cratedb-mcp#17
File: CHANGES.md:5-5
Timestamp: 2025-05-16T13:35:04.487Z
Learning: For the cratedb-mcp repository, version numbers and release dates in CHANGES.md are updated by a dedicated "Release vX.Y.Z" commit as part of the release process, not during documentation preparation PRs.
Learnt from: amotl
PR: crate/cratedb-mcp#0
File: :0-0
Timestamp: 2025-05-17T14:55:23.400Z
Learning: In the cratedb-mcp repository, the `backlog.md` document is intended as a functional planning document that doesn't need to adhere to strict formatting standards. Avoid pointing out formatting or layout shortcomings in this file during reviews.
cratedb_mcp/instructions.md (2)
Learnt from: amotl
PR: crate/cratedb-mcp#0
File: :0-0
Timestamp: 2025-05-17T14:55:23.400Z
Learning: In the cratedb-mcp repository, the `backlog.md` document is intended as a functional planning document that doesn't need to adhere to strict formatting standards. Avoid pointing out formatting or layout shortcomings in this file during reviews.
Learnt from: amotl
PR: crate/cratedb-mcp#17
File: CHANGES.md:5-5
Timestamp: 2025-05-16T13:35:04.487Z
Learning: For the cratedb-mcp repository, version numbers and release dates in CHANGES.md are updated by a dedicated "Release vX.Y.Z" commit as part of the release process, not during documentation preparation PRs.
🪛 LanguageTool
cratedb_mcp/instructions.md

[style] ~23-~23: Consider using just “return”.
Context: ...o SQL queries, run them on CrateDB, and return back results. - Try to generate SQL queries ...

(RETURN_BACK)

🔇 Additional comments (5)
pyproject.toml (1)

97-101: LGTM! Package data configuration correctly implemented.

The setuptools configuration properly enables inclusion of Markdown files as package data, which will ensure the new instructions.md file is bundled with the package distribution.

CHANGES.md (1)

4-5: LGTM! Changelog entry properly documents the feature addition.

The entry clearly describes the addition of instructions to the MCP server and includes appropriate contributor attribution.

cratedb_mcp/__main__.py (2)

1-1: LGTM! Modern approach to importing package resources.

Using importlib.resources is the recommended way to access package data files in modern Python.


15-21: LGTM! Instructions loading and FastMCP integration implemented correctly.

The implementation properly loads the instructions file using the modern importlib.resources API and correctly passes the content to the FastMCP application instance.

cratedb_mcp/instructions.md (1)

1-80: Excellent comprehensive instructions for CrateDB MCP server.

The instructions file provides thorough guidance covering CrateDB architecture, SQL query rules, tool usage, and writing principles. The content correctly emphasizes key differences between CrateDB and similar systems (PostgreSQL, Elasticsearch) and includes specific technical guidance like using MAX_BY for latest values and proper interval syntax.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
tests/test_instructions.py (1)

4-14: Good test coverage for instruction loading verification.

The test effectively verifies that the MCP server has been initialized with the expected instruction sections. The use of string containment checks is appropriate for ensuring key content is present.

Consider enhancing the test robustness by checking for instruction content more flexibly to handle potential text variations:

def test_instructions():
    instructions_text = mcp.instructions
+   assert instructions_text, "Instructions should not be empty"
+   
+   # Convert to lowercase for case-insensitive matching
+   instructions_lower = instructions_text.lower()

    # MCP instructions.
-   assert "MCP tool instructions" in instructions_text
+   assert "mcp tool instructions" in instructions_lower

    # General instructions.
-   assert "Things to remember when working with CrateDB" in instructions_text
-   assert "Rules for writing SQL queries" in instructions_text
-   assert "Core writing principles" in instructions_text
+   assert "things to remember when working with cratedb" in instructions_lower
+   assert "rules for writing sql queries" in instructions_lower
+   assert "core writing principles" in instructions_lower

This would make the test more resilient to minor formatting changes while still ensuring the essential content is present.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9a025f0 and fbd746d.

📒 Files selected for processing (5)
  • CHANGES.md (1 hunks)
  • cratedb_mcp/__main__.py (2 hunks)
  • cratedb_mcp/instructions.md (1 hunks)
  • pyproject.toml (2 hunks)
  • tests/test_instructions.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • pyproject.toml
  • CHANGES.md
  • cratedb_mcp/main.py
  • cratedb_mcp/instructions.md
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: amotl
PR: crate/cratedb-mcp#0
File: :0-0
Timestamp: 2025-05-17T14:55:23.400Z
Learning: In the cratedb-mcp repository, the `backlog.md` document is intended as a functional planning document that doesn't need to adhere to strict formatting standards. Avoid pointing out formatting or layout shortcomings in this file during reviews.
Learnt from: amotl
PR: crate/cratedb-mcp#17
File: CHANGES.md:5-5
Timestamp: 2025-05-16T13:35:04.487Z
Learning: For the cratedb-mcp repository, version numbers and release dates in CHANGES.md are updated by a dedicated "Release vX.Y.Z" commit as part of the release process, not during documentation preparation PRs.
tests/test_instructions.py (2)
Learnt from: amotl
PR: crate/cratedb-mcp#0
File: :0-0
Timestamp: 2025-05-17T14:55:23.400Z
Learning: In the cratedb-mcp repository, the `backlog.md` document is intended as a functional planning document that doesn't need to adhere to strict formatting standards. Avoid pointing out formatting or layout shortcomings in this file during reviews.
Learnt from: amotl
PR: crate/cratedb-mcp#17
File: CHANGES.md:5-5
Timestamp: 2025-05-16T13:35:04.487Z
Learning: For the cratedb-mcp repository, version numbers and release dates in CHANGES.md are updated by a dedicated "Release vX.Y.Z" commit as part of the release process, not during documentation preparation PRs.
🔇 Additional comments (1)
tests/test_instructions.py (1)

1-2: LGTM! Clean import structure.

The import statement correctly imports the mcp object from the main module, following standard conventions.

@amotl amotl changed the title Prompt: Add instructions (system prompt) to MCP server Prompt: Add general and MCP tool instructions to system prompt of MCP server Jul 19, 2025
pyproject.toml Outdated
"cachetools<7",
"click<9",
"cratedb-about==0.0.5",
"cratedb-about @ git+https://github.com/crate/about.git@instructions",
Copy link
Member Author

@amotl amotl Jul 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a release first, depending on another patch.

It's also why CI is failing, because it probes an upload to PyPI, which is rejected because of that spot. Please review both patches. If they are acknowledged, we are able to land them in lock-step.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v0.0.6 has been released.

-- https://pypi.org/project/cratedb-about/

Comment on lines 6 to 9
1. `get_table_metadata`: Return column schema and metadata for all tables stored in CrateDB. Use it to inquire entities you don't know about.
2. `query_sql`: Execute SQL query on CrateDB and return results.
3. `get_cratedb_documentation_index`: Returns the table of contents for the CrateDB documentation. If in doubt about CrateDB-specific syntax, you can obtain the documentation here.
4. `fetch_cratedb_docs`: Once a specific link within the CrateDB documentation is identified, you can download its content here by providing the link.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it was me who wrote those, but it already felt slightly wrong to me when I wrote it 🙂. __main__.py defines the tools, and each of those has a description. In my understanding, an agent would do some sort of tool discovery and consume descriptions from there. Which means we should either look into extending those descriptions (if not sufficient) or tweak the system prompt to force the consumption of those descriptions?

Copy link
Member Author

@amotl amotl Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my understanding, an agent would do some sort of tool discovery and consume descriptions from there.

That's true. I had the same thoughts, and will investigate the situation. Thanks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, the thing is: It is apparently totally at the discretion of the MCP client to use the tools, after invoking the list_tools API method of the MCP server. Apparently, this is not guaranteed, and also, it is not enough: While individual tools could inform the prompt about their individual capabilities, it would not be sufficient to relay guidelines how to use multiple tools in combination, just to enumerate a single example. In this spirit, there must always be a separate set of guidelines that embrace the whole ensemble. It is also defined by the FastMCP server like this:

instructions: Description of how to interact with this server. These instructions help clients understand the server’s purpose and available functionality.

You can also explore a similar observation when using other LLM frameworks that can use MCP tools these days: While you can easily import available tools, more often than not, you will need to supply usage instructions separately:

Salvatore's post Coding with LLMs in the summer of 2025 also emphasizes the detail to be in absolute control of your context prompts, so I also think it is better to be explicit and provide excellent human-written guidelines for MCP server tool use.

Avoid any RAG that will show only part of the code / context to the LLM. This destroys LLMs performance. You must be in control of what the LLM can see when providing a reply.

Copy link
Member Author

@amotl amotl Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my understanding, an agent would do some sort of tool discovery and consume descriptions from there. Which means we should either look into extending those descriptions (if not sufficient) or tweak the system prompt to force the consumption of those descriptions?

Yeah, tool discovery is present, and I agree what you are describing would resemble a perfect world situation, but still people are providing human-written guidelines, and recommend to do it, because maybe LLMs will just not be as smart as we would like them to be.

Copy link
Member Author

@amotl amotl Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coming from tell the LLM which tools to use and when, I think we should spice up our specific instructions, for example by caring about tool sequencing:

When tasks require multiple steps, outline the expected tool sequence. For example, “First use web_search to find recent articles, then fetch_url to get full content, then summarize_text to create a brief overview.”

While we only provide two pairs of tools, they can still be sequenced properly, so the LLM does not need to reason without supervision or missing clues, while providing them would be so easy.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the research, it sounds plausible that we need to tell the LLM how to best combine the tools.

I think we should spice up our specific instructions

Yes, what I wanted to express is that I couldn't really validate if the instructions I came up with initially made a difference or not. It is probably one of the major difficulties to tell what part of a prompt actually makes a difference in how the LLM processes a question, and what doesn't. Since it depends on the model, one probably cannot simply tell, and hence one needs to be extra verbose.

Copy link
Member Author

@amotl amotl Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it looks like common practice. @WalBeh had good experiences leveling up LLM understanding with those techniques when using gpt-4o or 4.1 models, and also sonnet.

Copy link
Member Author

@amotl amotl Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sounds plausible that we need to tell the LLM how to best combine the tools.

0d1b65c adds two more rules that put the tools in context to each other, i.e. improving details about "tool sequencing", aka. how to combine them well.

Please add any feedback about them also in retrospective when applicable, or just send patches to fix forward ;]. Thanks!

Base automatically changed from tool-refactor to main July 21, 2025 14:55
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
cratedb_mcp/instructions.md (2)

8-12: Align tool descriptions for tense & clarity

The list mixes imperative (“Execute”) and present-tense (“Returns”). Unifying the voice improves readability and avoids cognitive friction when these sentences are injected into the system prompt.

-1. `get_table_metadata`: Return column schema and metadata for all tables stored in CrateDB. Use it to inquire entities you don't know about.
-2. `query_sql`: Execute SQL query on CrateDB and return results.
-3. `get_cratedb_documentation_index`: Returns the table of contents for the CrateDB documentation. If in doubt about CrateDB-specific syntax, you can obtain the documentation here.
-4. `fetch_cratedb_docs`: Once a specific link within the CrateDB documentation is identified, you can download its content here by providing the link.
+1. `get_table_metadata`: Returns column schema and metadata for all tables stored in CrateDB. Use it when you need to discover entities you are unfamiliar with.
+2. `query_sql`: Executes an SQL query on CrateDB and returns the results.
+3. `get_cratedb_documentation_index`: Returns the table of contents of the CrateDB documentation. Use it whenever you need to verify CrateDB-specific syntax.
+4. `fetch_cratedb_docs`: Given a link returned by `get_cratedb_documentation_index`, fetches the full content of that documentation page.

15-24: Add best-practice hints for SQL & doc retrieval flows

Two micro-tweaks tighten the guidance:

  1. Encourage parameterised, column-specific queries with a LIMIT to avoid overwhelming result sets.
  2. Clarify that fetch_cratedb_docs should be used after the index lookup and that the agent should interpret results before answering.
-  column names and types, then use `query_sql` to query the database using SQL, based on
-  user's inquiries and questions.
+  column names and types. Next, use `query_sql` to execute a parameterised SQL query that
+  returns only the columns you need (avoid `SELECT *`) and, where appropriate, add a
+  `LIMIT` clause to keep result sets concise.

-  about CrateDB, then use `fetch_cratedb_docs` to fetch individual documentation pages that
-  can be used to answer questions about CrateDB precisely.
+  about CrateDB. Then, use `fetch_cratedb_docs` to retrieve individual pages that
+  can be quoted verbatim when answering questions about CrateDB.

-Try to reason and give an interpretation of the result.
+After fetching data, reason about the output and provide a concise interpretation before
+formulating the final answer.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b73d6d7 and 0d1b65c.

📒 Files selected for processing (1)
  • cratedb_mcp/instructions.md (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: amotl
PR: crate/cratedb-mcp#0
File: :0-0
Timestamp: 2025-05-17T14:55:23.400Z
Learning: In the cratedb-mcp repository, the `backlog.md` document is intended as a functional planning document that doesn't need to adhere to strict formatting standards. Avoid pointing out formatting or layout shortcomings in this file during reviews.
Learnt from: amotl
PR: crate/cratedb-mcp#17
File: CHANGES.md:5-5
Timestamp: 2025-05-16T13:35:04.487Z
Learning: For the cratedb-mcp repository, version numbers and release dates in CHANGES.md are updated by a dedicated "Release vX.Y.Z" commit as part of the release process, not during documentation preparation PRs.
cratedb_mcp/instructions.md (4)

Learnt from: amotl
PR: crate/cratedb-mcp#0
File: :0-0
Timestamp: 2025-05-17T14:55:23.400Z
Learning: In the cratedb-mcp repository, the backlog.md document is intended as a functional planning document that doesn't need to adhere to strict formatting standards. Avoid pointing out formatting or layout shortcomings in this file during reviews.

Learnt from: amotl
PR: #17
File: CHANGES.md:5-5
Timestamp: 2025-05-16T13:35:04.487Z
Learning: For the cratedb-mcp repository, version numbers and release dates in CHANGES.md are updated by a dedicated "Release vX.Y.Z" commit as part of the release process, not during documentation preparation PRs.

Learnt from: amotl
PR: #54
File: tests/test_cli.py:0-0
Timestamp: 2025-07-20T17:17:10.660Z
Learning: In the cratedb-mcp project, tests should avoid asserting against mcp.settings internal state as these assertions will break with later versions of FastMCP. Tests should focus on verifying that functions are called with correct parameters rather than checking internal implementation details.

Learnt from: amotl
PR: #24
File: pyproject.toml:76-76
Timestamp: 2025-05-17T16:02:09.342Z
Learning: For the cratedb-mcp project, FastMCP pre-2.0 releases provide the same API surface needed by the application, so a lower bound on the FastMCP dependency is not necessary.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: oci
  • GitHub Check: oci

@amotl
Copy link
Member Author

amotl commented Jul 21, 2025

@coderabbitai: Thanks, we've used your suggestions to improve the writing style per 43e449f.

@coderabbitai
Copy link

coderabbitai bot commented Jul 21, 2025

Tip

For best results, initiate chat on the files or code changes.

@amotl You're very welcome! I'm glad the writing style suggestions were helpful in improving the instructions. It's great to see how responsive you are to feedback - this collaborative approach really helps enhance the quality of the codebase. The updated instructions should now provide clearer guidance for users working with the MCP tools. Thanks for taking the time to incorporate the suggestions!


🧠 Learnings used
Learnt from: amotl
PR: crate/cratedb-mcp#0
File: :0-0
Timestamp: 2025-05-17T14:55:23.400Z
Learning: In the cratedb-mcp repository, the `backlog.md` document is intended as a functional planning document that doesn't need to adhere to strict formatting standards. Avoid pointing out formatting or layout shortcomings in this file during reviews.

Learnt from: amotl
PR: crate/cratedb-mcp#0
File: :0-0
Timestamp: 2025-05-17T14:55:30.236Z
Learning: Avoid mentioning formatting and layout issues in `backlog.md` as nitpick comments during code reviews. This file serves a functional purpose and is not meant to have perfect formatting.

Learnt from: amotl
PR: crate/cratedb-mcp#17
File: CHANGES.md:5-5
Timestamp: 2025-05-16T13:35:04.487Z
Learning: For the cratedb-mcp repository, version numbers and release dates in CHANGES.md are updated by a dedicated "Release vX.Y.Z" commit as part of the release process, not during documentation preparation PRs.

If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

@amotl amotl merged commit 623f701 into main Jul 21, 2025
10 checks passed
@amotl amotl deleted the instructions branch July 21, 2025 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants