add state docs

This commit is contained in:
2026-06-13 20:09:43 +01:00
parent 3e78b15f19
commit ccd0093f00
@@ -0,0 +1,80 @@
apiVersion: toolhive.stacklok.dev/v1alpha1
kind: VirtualMCPServer
metadata:
name: state-docs-vmcp
namespace: toolhive-system
spec:
groupRef:
name: homelab-core
embeddingServerRef:
name: homelab-embedding
config:
aggregation:
excludeAllTools: true
tools:
- workload: gitea-mcp
toolConfigRef:
name: state-doc-tools
- workload: automem
toolConfigRef:
name: state-doc-tools
- workload: argocd-mcp
toolConfigRef:
name: state-doc-tools
- workload: kubernetes-mcp
toolConfigRef:
name: state-doc-tools
compositeTools:
- name: document_app_running_state
description: "Collect live runtime and deployment state for an application and write a markdown snapshot."
parameters:
type: object
properties:
appName:
type: string
namespace:
type: string
repoPath:
type: string
required: [appName, namespace, repoPath]
steps:
- id: app
tool: argocd-remote_get_application
arguments:
name: "{{ .input.appName }}"
- id: appHealth
tool: argocd-remote_get_application_health
arguments:
name: "{{ .input.appName }}"
- id: pods
tool: kubernetes-remote_get_pods
arguments:
namespace: "{{ .input.namespace }}"
- id: events
tool: kubernetes-remote_get_events
arguments:
namespace: "{{ .input.namespace }}"
- id: prior
tool: automem-remote_memory_search
arguments:
query: "{{ .input.appName }} runtime summary operating notes"
- id: writeDoc
tool: gitea-remote_create_or_update_file
arguments:
path: "{{ .input.repoPath }}"
content: |
# Running State — {{ .input.appName }}
- Namespace: {{ .input.namespace }}
- Captured: {{ now }}
- ArgoCD sync: {{ .steps.app.output.syncStatus }}
- ArgoCD health: {{ .steps.appHealth.output.healthStatus }}
## Pods
{{ .steps.pods.output }}
## Recent Events
{{ .steps.events.output }}
## Prior Notes
{{ .steps.prior.output }}