@@ -222,6 +222,30 @@ function generateHistory(
222222 return months ;
223223}
224224
225+ // ---------------------------------------------------------------------------
226+ // Response Formatting
227+ // ---------------------------------------------------------------------------
228+
229+ function formatBudgetSummary ( data : BudgetDataResponse ) : string {
230+ const lines : string [ ] = [
231+ "Budget Allocator Configuration" ,
232+ "==============================" ,
233+ "" ,
234+ `Default Budget: ${ data . config . currencySymbol } ${ data . config . defaultBudget . toLocaleString ( ) } ` ,
235+ `Available Presets: ${ data . config . presetBudgets . map ( ( b ) => `${ data . config . currencySymbol } ${ b . toLocaleString ( ) } ` ) . join ( ", " ) } ` ,
236+ "" ,
237+ "Categories:" ,
238+ ...data . config . categories . map (
239+ ( c ) => ` - ${ c . name } : ${ c . defaultPercent } % default` ,
240+ ) ,
241+ "" ,
242+ `Historical Data: ${ data . analytics . history . length } months` ,
243+ `Benchmark Stages: ${ data . analytics . stages . join ( ", " ) } ` ,
244+ `Default Stage: ${ data . analytics . defaultStage } ` ,
245+ ] ;
246+ return lines . join ( "\n" ) ;
247+ }
248+
225249// ---------------------------------------------------------------------------
226250// MCP Server Setup
227251// ---------------------------------------------------------------------------
@@ -240,6 +264,7 @@ server.registerTool(
240264 description :
241265 "Returns budget configuration with 24 months of historical allocations and industry benchmarks by company stage" ,
242266 inputSchema : { } ,
267+ outputSchema : BudgetDataResponseSchema . shape ,
243268 _meta : { [ RESOURCE_URI_META_KEY ] : resourceUri } ,
244269 } ,
245270 async ( ) : Promise < CallToolResult > => {
@@ -268,9 +293,10 @@ server.registerTool(
268293 content : [
269294 {
270295 type : "text" ,
271- text : JSON . stringify ( response ) ,
296+ text : formatBudgetSummary ( response ) ,
272297 } ,
273298 ] ,
299+ structuredContent : response ,
274300 } ;
275301 } ,
276302) ;
0 commit comments