MCPcopy Create free account
hub / github.com/ShipSecAI/studio / getExposedParameterIds

Function getExposedParameterIds

packages/component-sdk/src/tool-helpers.ts:102–127  ·  view source on GitHub ↗
(component: ComponentDefinition)

Source from the content-addressed store, hash-verified

100 * Secret parameters are always excluded.
101 */
102export function getExposedParameterIds(component: ComponentDefinition): string[] {
103 if (!component.parameters) {
104 return [];
105 }
106
107 const shape = getObjectShape(component.parameters);
108 if (!shape) {
109 return [];
110 }
111
112 return Object.entries(shape)
113 .filter(([id, schema]) => {
114 if (id.startsWith('__')) {
115 return false;
116 }
117 const meta = getParamMeta(schema as any);
118 if (!meta?.exposeToTool) {
119 return false;
120 }
121 if (meta.editor === 'secret') {
122 return false;
123 }
124 return true;
125 })
126 .map(([id]) => id);
127}
128
129// ============================================================================
130// Schema Generation Helpers

Callers 4

callComponentToolMethod · 0.90
getToolInputShapeFunction · 0.85
getToolSchemaFunction · 0.85

Calls 2

getParamMetaFunction · 0.90
getObjectShapeFunction · 0.70

Tested by

no test coverage detected