Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed images/akuity.png
Binary file not shown.
6 changes: 4 additions & 2 deletions src/argocd/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ export class ArgoCDClient {
public async getWorkloadLogs(
applicationName: string,
applicationNamespace: string,
resourceRef: V1alpha1ResourceResult
resourceRef: V1alpha1ResourceResult,
container: string
) {
const logs: ApplicationLogEntry[] = [];
await this.client.getStream<ApplicationLogEntry>(
Expand All @@ -158,7 +159,8 @@ export class ArgoCDClient {
kind: resourceRef.kind,
version: resourceRef.version,
follow: false,
tailLines: 100
tailLines: 100,
container: container
},
(chunk) => logs.push(chunk)
);
Expand Down
10 changes: 6 additions & 4 deletions src/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,19 @@ export class Server extends McpServer {
);
this.addJsonOutputTool(
'get_application_workload_logs',
'get_application_workload_logs returns logs for application workload (Deployment, StatefulSet, Pod, etc.) by application name and resource ref',
'get_application_workload_logs returns logs for application workload (Deployment, StatefulSet, Pod, etc.) by application name and resource ref and optionally container name',
{
applicationName: z.string(),
applicationNamespace: ApplicationNamespaceSchema,
resourceRef: ResourceRefSchema
resourceRef: ResourceRefSchema,
container: z.string()
},
async ({ applicationName, applicationNamespace, resourceRef }) =>
async ({ applicationName, applicationNamespace, resourceRef, container }) =>
await this.argocdClient.getWorkloadLogs(
applicationName,
applicationNamespace,
resourceRef as V1alpha1ResourceResult
resourceRef as V1alpha1ResourceResult,
container
)
);
this.addJsonOutputTool(
Expand Down