mcp: add ttl for list results (SEP-2549) (#1008)

Fixes #994
This commit is contained in:
Guglielmo Colombo 2026-06-18 15:20:21 +02:00 • committed by GitHub
commit 6333aa7c63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 356 additions and 70 deletions

View file

@ -53,6 +53,8 @@ See also modelcontextprotocol/go-sdk#225.
"jsonrpc": "2.0",
"id": 2,
"result": {
"ttlMs": 0,
"cacheScope": "public",
"tools": []
}
}
@ -60,6 +62,8 @@ See also modelcontextprotocol/go-sdk#225.
"jsonrpc": "2.0",
"id": 3,
"result": {
"ttlMs": 0,
"cacheScope": "public",
"tools": []
}
}

View file

@ -45,6 +45,8 @@ code_review
"jsonrpc": "2.0",
"id": 2,
"result": {
"ttlMs": 0,
"cacheScope": "public",
"tools": []
}
}
@ -52,6 +54,8 @@ code_review
"jsonrpc": "2.0",
"id": 4,
"result": {
"ttlMs": 0,
"cacheScope": "public",
"prompts": [
{
"arguments": [

View file

@ -67,6 +67,8 @@ info.txt
"jsonrpc": "2.0",
"id": 2,
"result": {
"ttlMs": 0,
"cacheScope": "public",
"resources": [
{
"mimeType": "text/plain",
@ -85,6 +87,8 @@ info.txt
"jsonrpc": "2.0",
"id": 3,
"result": {
"ttlMs": 0,
"cacheScope": "public",
"contents": [
{
"uri": "embedded:info",
@ -103,6 +107,8 @@ info.txt
"jsonrpc": "2.0",
"id": 3,
"result": {
"ttlMs": 0,
"cacheScope": "public",
"contents": [
{
"uri": "file:///info.txt",

View file

@ -87,6 +87,8 @@ infoWithIcon
"jsonrpc": "2.0",
"id": 2,
"result": {
"ttlMs": 0,
"cacheScope": "public",
"tools": [
{
"description": "return resourceLink content with Icon",
@ -140,6 +142,8 @@ infoWithIcon
"jsonrpc": "2.0",
"id": 3,
"result": {
"ttlMs": 0,
"cacheScope": "public",
"resources": [
{
"mimeType": "text/plain",
@ -164,6 +168,8 @@ infoWithIcon
"jsonrpc": "2.0",
"id": 4,
"result": {
"ttlMs": 0,
"cacheScope": "public",
"prompts": [
{
"arguments": [

View file

@ -64,6 +64,8 @@ inc
"jsonrpc": "2.0",
"id": 2,
"result": {
"ttlMs": 0,
"cacheScope": "public",
"tools": [
{
"description": "say hi",
@ -169,6 +171,8 @@ inc
"jsonrpc": "2.0",
"id": 3,
"result": {
"ttlMs": 0,
"cacheScope": "public",
"resources": []
}
}
@ -176,6 +180,8 @@ inc
"jsonrpc": "2.0",
"id": 4,
"result": {
"ttlMs": 0,
"cacheScope": "public",
"prompts": []
}
}