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
24 changes: 24 additions & 0 deletions apps/demo/src/apps/weather/agents/summary.agent.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Agent, AgentContext } from '@frontmcp/sdk';
import GetWeatherTool from '../tools/get-weather.tool';
import { z } from 'zod';

@Agent({
name: 'summary-agent',
systemInstructions: 'Agent that provides weather summaries, use the tool "get-weather" to get weather details',
inputSchema: {
location: z.string().describe('City name or location'),
units: z.enum(['celsius', 'fahrenheit']).optional().describe('Temperature units'),
},
outputSchema: {
summary: z.string().describe('Weather summary for the given location'),
},
llm: {
provider: 'openai',
model: 'gpt-5',
apiKey: {
env: 'OPENAI_API_KEY',
},
},
tools: [GetWeatherTool],
})
export default class SummaryAgent extends AgentContext {}
2 changes: 2 additions & 0 deletions apps/demo/src/apps/weather/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
import { App } from '@frontmcp/sdk';

import GetWeatherTool from './tools/get-weather.tool';
import SummaryAgent from './agents/summary.agent';

@App({
id: 'weather',
name: 'Weather MCP App',
description: 'Demo app showing Tool UI templates for rich weather displays',
providers: [],
agents: [SummaryAgent],
tools: [GetWeatherTool],
})
export default class WeatherMcpApp {}
2 changes: 1 addition & 1 deletion apps/demo/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import CrmMcpApp from './apps/crm';
apps: [DashboardApp, WeatherMcpApp, CrmMcpApp, ExpenseMcpApp, CalculatorMcpApp, EmployeeTimeMcpApp],
logging: { level: LogLevel.Verbose },
http: {
port: 3002,
port: 3003,
},
transport: {
enableLegacySSE: true,
Expand Down
Loading
Loading