MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / normalizeFormat

Method normalizeFormat

server/src/formats.ts:72–85  ·  view source on GitHub ↗
(format: any)

Source from the content-addressed store, hash-verified

70 }
71
72 private normalizeFormat(format: any): FormatInfo {
73 // Handle string format (just a name)
74 if (typeof format === "string") {
75 return { name: format };
76 }
77
78 // Handle object format
79 return {
80 name: format.name || format.format || "unknown",
81 dimensions: format.dimensions || format.size,
82 aspect_ratio: format.aspect_ratio || format.aspectRatio,
83 description: format.description,
84 };
85 }
86
87 async enrichAgentsWithFormats(agents: Agent[]): Promise<Map<string, AgentFormatsProfile>> {
88 const profiles = new Map<string, AgentFormatsProfile>();

Callers 1

getFormatsForAgentMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected