Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/lemon-cameras-spend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@upstash/context7-mcp": patch
---

Adds MCP tool annotations (readOnlyHint) to all tools to help MCP clients better understand tool behavior and make safer decisions about tool execution.
6 changes: 6 additions & 0 deletions packages/mcp/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ IMPORTANT: Do not call this tool more than 3 times per question. If you cannot f
.string()
.describe("Library name to search for and retrieve a Context7-compatible library ID."),
},
annotations: {
readOnlyHint: true,
},
},
async ({ query, libraryName }) => {
const ctx = requestContext.getStore();
Expand Down Expand Up @@ -212,6 +215,9 @@ IMPORTANT: Do not call this tool more than 3 times per question. If you cannot f
"The question or task you need help with. Be specific and include relevant details. Good: 'How to set up authentication with JWT in Express.js' or 'React useEffect cleanup function examples'. Bad: 'auth' or 'hooks'. IMPORTANT: Do not include any sensitive or confidential information such as API keys, passwords, credentials, or personal data in your query."
),
},
annotations: {
readOnlyHint: true,
},
},
async ({ query, libraryId }) => {
const ctx = requestContext.getStore();
Expand Down
Loading