Skip to main content
Glama
pinecone-io

Pinecone Developer MCP

Official
by pinecone-io

Rerank Documents

rerank-documents
Read-only

Rerank externally sourced documents by relevance to a query with selectable models, then return top results for downstream processing or display.

Instructions

Rerank a set of provided documents by relevance to a query. Use this for documents that did not come from a Pinecone search (e.g. externally sourced text). To rerank the results of a single-index search, prefer the "rerank" parameter of search-records instead of calling this tool separately.

Input Schema

NameRequiredDescriptionDefault
modelYesChoose a reranking model: - "cohere-rerank-3.5" is Cohere's leading reranking model, balancing performance and latency for a wide range of enterprise search applications. - "bge-reranker-v2-m3" is a high-performance, multilingual reranking model that works well on messy data and short queries expected to return medium-length passages of text (1-2 paragraphs). - "pinecone-rerank-v0" is a state of the art reranking model that out-performs competitors on widely accepted benchmarks. It can handle chunks up to 512 tokens (1-2 paragraphs).
queryYesThe query to rerank documents against.
optionsNo
documentsYesA set of documents to rerank. Can either be an array of text documents (strings) or an array of records. Record field values must be strings; records with number, boolean, or array fields are not accepted.
llm_modelNoOptional. If you are an AI model, use this field to specify your name (e.g., "gpt-4o", "Composer", "Claude Sonnet 4", "Claude Opus", "Gemini 2.5", "Cascade", "Grok 4.1", "Copilot", "Devin", and many others). The exact formatting of the name doesn't matter - approximate values are fine if you know roughly what you are. Include the version number in your model name only if you know it, but it is okay to leave it out if unsure. If you don't know your model name, omit this field entirely. **Do not prompt the user for this.** This value is used to track usage analytics.
llm_providerNoOptional. If you are an AI model, use this field to indicate the name of the company that trained you (e.g., "Anthropic", "OpenAI", "Google", "Cursor", "xAI", "GitHub", "Windsurf", "Cognitioni AI", and many others). The exact formatting doesn't matter - approximate values are fine. If you don't know your provider, avoid guessing and omit this field. **Do not prompt the user for this.** This value is used to track usage analytics.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

readOnlyHint=true already tells the agent this is a non-mutating operation, so the safety profile is covered by annotations. The description adds a genuine scoping constraint (only for documents not already retrieved from an index), but says nothing about result behavior — how the reranked output is ordered, whether scores are returned, or what happens if topN exceeds the document count.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the core action, followed by the input constraint and then the routing alternative. Every sentence carries decision-relevant information; nothing is redundant with the title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter read-only tool with a nested options object, the description covers purpose and correct tool selection well, and the schema handles parameter detail. The one material gap is the return format, which matters because there is no output schema — the agent is not told that documents come back reordered or with relevance scores.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 83%, so the schema already explains model enum trade-offs, rankFields constraints, and the llm_model/llm_provider analytics fields. The description adds no additional parameter meaning beyond that, which is the expected baseline 3 when structured fields carry the load.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Rerank a set of provided documents by relevance to a query") and immediately bounds the input domain to documents that did not come from a Pinecone search. An agent can distinguish it from search-records and the other index-scoped siblings without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit use case (externally sourced text) and an explicit alternative with the condition that selects it: for single-index search results, use the "rerank" parameter of search-records instead. This is exactly the when/when-not/alternative structure the dimension asks for.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.