Menu

AI

MCP Argument Completion

How MCP argument completion suggests values for prompt and resource template arguments, how completion/complete works in the 2026-07-28 spec, and its limits.

By: Irina ShvayaOctober 28, 2026

MCP Argument Completion

This page is part of our MCP specification reference, a plain-English guide to the Model Context Protocol spec (version 2026-07-28), within The MCP Guide. Building a server? See MCP development.

MCP argument completion is autocomplete for the arguments of prompts and resource templates. As a user types a value, the client sends a completion/complete request with what they have typed so far. The server replies with up to 100 ranked suggestions, like an IDE's code completion.

Status in the 2026-07-28 spec: core (optional server utility). A server that offers it must declare the completions capability. It does not apply to tool arguments.

Completion is a small feature with a big effect on usability. Without it, users have to know exact IDs or names. This page is based on the 2026-07-28 Completion page, checked on 28 October 2026.

Key Takeaways

  • Completion suggests values for prompt arguments and resource template variables, not for tool arguments.
  • Servers that support it must declare the completions capability.
  • The client sends completion/complete with a reference (ref/prompt or ref/resource), the argument name and the partial value.
  • The server returns up to 100 values per response, plus an optional total and a hasMore flag.
  • A context.arguments field lets the client pass values already chosen, so later suggestions can depend on earlier ones.
  • The spec requires rate limiting and access control so completion does not leak data.

What completion is

The spec says servers can "offer autocompletion suggestions for the arguments of prompts and resource templates." When users fill in an argument for a prompt (identified by name) or a resource template (identified by URI), the server can suggest values.

There are two reference types:

TypeWhat it points toExample
ref/promptA prompt, by name{"type": "ref/prompt", "name": "code_review"}
ref/resourceA resource URI or URI template{"type": "ref/resource", "uri": "file:///{path}"}

Tools are not on that list. Tool arguments are filled in by the model using the tool's input schema. Completion is for humans filling in prompts and resource templates.

Why completion exists

Prompts and resource templates are user-facing. A user who runs a "review this repository" prompt may not remember the exact repository name. A template like orders://{orderId} is useless if nobody knows the IDs.

The spec frames completion as an IDE-style experience. Apps may show suggestions in a dropdown as users type, though the spec does not require any specific interface.

How it works

A basic request

The client sends completion/complete with the reference, the argument name and the current value. This is the spec's example:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "completion/complete",
  "params": {
    "ref": { "type": "ref/prompt", "name": "code_review" },
    "argument": { "name": "language", "value": "py" }
  }
}

The server replies:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "resultType": "complete",
    "completion": {
      "values": ["python", "pytorch", "pyside"],
      "total": 10,
      "hasMore": true
    }
  }
}

The rules for results:

  • At most 100 values per response.
  • Values ranked by relevance.
  • total is optional and gives the full match count.
  • hasMore says whether more results exist.

Using earlier answers

For prompts or templates with several arguments, clients should include earlier choices in context.arguments. In the spec's example, the user already chose python for language. A completion request for framework with the value fla then returns only flask.

That is useful for dependent fields. A "region" choice can narrow the "store" suggestions, for example.

Server and client duties

The spec lists what each side SHOULD do:

Servers shouldClients should
Return suggestions sorted by relevanceDebounce rapid requests
Use fuzzy matching where appropriateCache results where appropriate
Rate limit completion requestsHandle missing or partial results gracefully
Validate all inputs

And four MUST rules for security. Implementations must validate all completion inputs, apply rate limiting, control access to sensitive suggestions, and prevent completion-based information disclosure.

That last rule matters. A completion endpoint that suggests customer names to anyone is a data leak, even if resources/read is locked down. Apply the same authorization to suggestions as to the data itself. The MCP security center covers related risks.

Errors

The spec suggests standard JSON-RPC errors:

  • -32601 when the server does not support completion.
  • -32602 for an invalid prompt name or missing required arguments.
  • -32603 for internal errors.

What changed across spec versions

VersionChange
2024-11-05completion/complete defined with ref/prompt and ref/resource; max 100 values; no capability flag (2024-11-05 Completion)
2025-03-26completions capability added to signal support explicitly (changelog)
2025-06-18context field added so requests can include previously resolved arguments (changelog)
2026-07-28Results carry resultType; requests carry the required _meta fields; the page names the reference type ResourceTemplateReference and describes it as "a resource URI or URI template"

The 2026-07-28 changelog lists no completion-specific change. The differences come from protocol-wide updates, such as stateless requests.

One more detail: completion results are not on the list of results that must carry caching hints. The client-side "cache results where appropriate" advice is separate from the ttlMs system used for lists.

Common mistakes

  1. Expecting completion for tool arguments. The spec covers prompts and resource templates only.
  2. Forgetting the capability. Without completions, clients should not expect the method. Servers without it should return -32601.
  3. Returning more than 100 values. Cap the list and set hasMore.
  4. Suggesting data the user cannot access. That breaks the access-control and disclosure MUST rules.
  5. No debounce on the client. Sending a request on every keystroke can trip the server's rate limit.

Next step

You have now covered tools, resources, prompts and completion. Browse the full MCP specification reference for the rest of the protocol, or talk to our MCP development team about building a server.

Frequently asked questions

What is completion/complete in MCP?

It is the request a client sends to get autocomplete suggestions for a prompt argument or resource template variable. The server returns up to 100 ranked values.

Does MCP completion work for tool arguments?

No. The spec defines completion for prompts and resource templates. The model fills in tool arguments from the tool's input schema.

How many suggestions can a server return?

At most 100 per response. The server can say how many matches exist in total with total, and whether there are more with hasMore.

Do servers have to support completion?

No. It is optional. Servers that support it must declare the completions capability, which was added in the 2025-03-26 spec.

Can completion suggestions depend on earlier choices?

Yes. Since 2025-06-18, clients can send already-chosen values in context.arguments. The server can use them to narrow its suggestions.

You Might Also like to Read

Get a FREE Website Audit

Enter your website and get a 20–30 page SEO, GEO, AEO & CRO audit within 24 hours. Completely free.

Don't have a site yet? Get in touch →

Ready to speak with a marketing expert?
Give us a call! (916) 866-7893

Websites Launched
1407
Websites Launched
Marketing Experts
29
Marketing Experts
Hours of Dedicated Work
204533
Hours of Dedicated Work
Irina S.Benjamin G.Jeanette M.David G.