Skip to content

Commit 80f87d8

Browse files
committed
rename some stuff
1 parent 2480af0 commit 80f87d8

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

apps/workers-builds/src/context.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { UserDetails } from '@repo/mcp-common/src/durable-objects/user_details'
2-
import type { ObservabilityMCP } from './index'
2+
import type { BuildsMCP } from './index'
33

44
export interface Env {
55
OAUTH_KV: KVNamespace
@@ -8,7 +8,7 @@ export interface Env {
88
MCP_SERVER_VERSION: string
99
CLOUDFLARE_CLIENT_ID: string
1010
CLOUDFLARE_CLIENT_SECRET: string
11-
MCP_OBJECT: DurableObjectNamespace<ObservabilityMCP>
11+
MCP_OBJECT: DurableObjectNamespace<BuildsMCP>
1212
USER_DETAILS: DurableObjectNamespace<UserDetails>
1313
MCP_METRICS: AnalyticsEngineDataset
1414
SENTRY_ACCESS_CLIENT_ID: string

apps/workers-builds/src/index.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { registerAccountTools } from '@repo/mcp-common/src/tools/account'
1515
import { registerWorkersTools } from '@repo/mcp-common/src/tools/worker'
1616

1717
import { MetricsTracker } from '../../../packages/mcp-observability/src'
18-
import { registerObservabilityTools } from './tools/observability'
18+
import { registerBuildsTools } from './tools/observability'
1919

2020
import type { AuthProps } from '@repo/mcp-common/src/cloudflare-oauth-handler'
2121
import type { Env } from './context'
@@ -35,7 +35,7 @@ type Props = AuthProps
3535

3636
type State = { activeAccountId: string | null }
3737

38-
export class ObservabilityMCP extends McpAgent<Env, State, Props> {
38+
export class BuildsMCP extends McpAgent<Env, State, Props> {
3939
_server: CloudflareMCPServer | undefined
4040
set server(server: CloudflareMCPServer) {
4141
this._server = server
@@ -58,13 +58,12 @@ export class ObservabilityMCP extends McpAgent<Env, State, Props> {
5858
},
5959
sentry: initSentryWithUser(env, this.ctx, this.props.user.id),
6060
options: {
61-
instructions: `# Cloudflare Workers Observability Tool
61+
instructions: `# Cloudflare Workers Builds Tool
6262
* A cloudflare worker is a serverless function
63-
* Workers Observability is the tool to inspect the logs for your cloudflare Worker
64-
* Each log is a structured JSON payload with keys and values
63+
* Workers Builds is a CI/CD system for building and deploying your Worker whenever you push code to GitHub/GitLab.
6564
6665
67-
This server allows you to analyze your Cloudflare Workers logs and metrics.
66+
This server allows you to view and debug Cloudflare Workers Builds for your Workers.
6867
`,
6968
},
7069
})
@@ -75,7 +74,7 @@ export class ObservabilityMCP extends McpAgent<Env, State, Props> {
7574
registerWorkersTools(this)
7675

7776
// Register Cloudflare Workers logs tools
78-
registerObservabilityTools(this)
77+
registerBuildsTools(this)
7978
}
8079

8180
async getActiveAccountId() {
@@ -111,13 +110,13 @@ const ObservabilityScopes = {
111110
export default {
112111
fetch: async (req: Request, env: Env, ctx: ExecutionContext) => {
113112
if (env.ENVIRONMENT === 'development' && env.DEV_DISABLE_OAUTH === 'true') {
114-
return await handleDevMode(ObservabilityMCP, req, env, ctx)
113+
return await handleDevMode(BuildsMCP, req, env, ctx)
115114
}
116115

117116
return new OAuthProvider({
118117
apiHandlers: {
119-
'/mcp': ObservabilityMCP.serve('/mcp'),
120-
'/sse': ObservabilityMCP.serveSSE('/sse'),
118+
'/mcp': BuildsMCP.serve('/mcp'),
119+
'/sse': BuildsMCP.serveSSE('/sse'),
121120
},
122121
// @ts-ignore
123122
defaultHandler: createAuthHandlers({ scopes: ObservabilityScopes, metrics }),

apps/workers-builds/src/tools/observability.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ import {
99
zValuesRequest,
1010
} from '@repo/mcp-common/src/types/workers-logs-schemas'
1111

12-
import type { ObservabilityMCP } from '../index'
12+
import type { BuildsMCP } from '../index'
1313

1414
/**
1515
* Registers the logs analysis tool with the MCP server
1616
* @param server The MCP server instance
1717
* @param accountId Cloudflare account ID
1818
* @param apiToken Cloudflare API token
1919
*/
20-
export function registerObservabilityTools(agent: ObservabilityMCP) {
20+
export function registerBuildsTools(agent: BuildsMCP) {
2121
// Register the worker logs analysis tool by worker name
2222
agent.server.tool(
2323
'query_worker_observability',

0 commit comments

Comments
 (0)