mcp: response projection and summaries in list_resources

Aperta
#4 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
api, backend

Direzione di ricerca

Start by locating the existing list_resources and get_resource entry points and examining how label and field selectors are passed through to kcp. Define the behavior for fields, limit/continue pagination, and conditionSummary, then validate projections, pagination, and condition reduction against the live-deployment scenarios described in the issue.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Motivation

list_resources returns full objects. For agent use this is the biggest cost driver: a question like "which of my resources aren't ready" pulls every manifest into the model context when one line per resource would do.

Proposal

Additions to list_resources (and get_resource where it applies):

  • fields: a list of JSONPath-like projections, for example metadata.name, spec.kubernetes.version. The response contains only those fields per item.
  • limit and continue: standard list pagination passed through to kcp.
  • conditionSummary: opt-in flag that reduces each item to name, namespace and its failing or unknown conditions (type, reason, message). Ready resources are returned as a count.

Server-side projection keeps responses compact regardless of the model or client. Label and field selectors already exist, this completes the story for read-heavy agent workloads.

Validation notes

Verified against a live deployment: the data needed for fleet-wide checks (status conditions, spec fields) is all present in responses today, but only as full manifests.
Typical agent questions ("do all my X run multi-zone", "which resources aren't ready", "what versions are my X on") need only two or three fields per item.

Lingua principale
Go
Stelle
1
Fork
2
Merge medio
8h 16m
PR unite (30g)
3

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di kcp-dev/contrib-virtual-workspaces

Tutte le issue di kcp-dev/contrib-virtual-workspaces

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.